Namespaced Quattor configuration
Work In Progress
Setup: derived from SCDB.
Current setup uses namespaces.
Namespaces
Quattor release 1.3 uses the concept of namespaces for organizing templates. The name of template in a namespace corresponds to its parent directory (or directories) that contain it with respect to the include root. An example: assume the include root for the Pan compiler is $I, then a template with path $I/my/namespaced/template.tpl should have the name my/namespaced/template in Pan:
template my/namespaced/template; # contents
Combining namespaced templates with the Pan feature called loadpath gives tremendous flexibility in defining various template tree parallel to each other with the possibility to select from a template which of the trees to use for compilation. The loadpath is set by built-in Pan variable LOADPATH, which is a list strings to consider to resolve a requested template.
A concrete example is the selection of the operating system. Assume the file system hierarchy under the include root $I is as follows:
$I +- centos3_i386 +- some +- template +- centos4_i386 +- some +- template
Then it is possible to
include some/template;
from other templates if either centos3_i386 or centos4_i386 was added to the Pan variable LOADPATH.