Changes

Jump to: navigation, search

Bcfg2 Configuration

241 bytes added, 13:51, 16 March 2012
TCheetah
The main purpose of TCheetah is to enable dynamic file content to be generated based off of client details, say if a particular configuration file needs a hostname. The /var/lib/bcfg2/TCheetah directory uses a similar structure to the [[#Cfg|Cfg]] plugin, and can use [[#G Files|G]] and [[#H Files|H]] files. However, the template files must be named template.
The contents of the files themselves are similar to configuration files, however there are a number of variables that can be used in the files themselves. These variables all start with "$self.metadata " and are as followsdiscussed in greater detail in the official documentation. The more commonly used ones are:
 
* Hostname: the client's hostname
* profile: shows the primary group this client is associated with
* groups: shows all groups the client is associated with
The templating system reads anything starting with a $ as a variable and anything starting with a # as a comment. A standard escape (\) will allow TCheetah to process any script variables or comments as plaintext.
1
edit

Navigation menu