Changes

Jump to: navigation, search

Bcfg2 Configuration

2,187 bytes added, 14:54, 15 March 2012
Cfg
===Cfg===
The Cfg plugin is the primary means of pushing out configuration files to clients. The Cfg directory follows a hierarchy similar to a standard root file system. When a [[#File Bundles| file bundle]] is declared, a folder structure matching that path must exist under /var/lib/bcfg2/Cfg. The configuration file itself. For example, a bundle which pushes out an /etc/hosts file would require the directory /var/lib/bcfg2/Cfg/etc/hosts to be created and a file called hosts to be present under that folder.
 
 
This seems counter-intuitive, but the reasoning behind it is that multiple instances of that configuration file may exist. Using the hosts example, there may be a specific host file needed for a File server and another one needed for a web server. From a file system perspective, they both exist under /etc/hosts, but they have different content. By having all possible /etc/hosts files existing under the directory /var/lib/bcfg2/etc/hosts/, we are able to more easily define which file goes to which group. However, even in the case where only one such variation of the file exists, that file still needs to be placed in the appropriate directory.
 
 
The two ways of ensuring that files of the same name but of differing content are sent to the correct clients are G (Group) files and H (Host) files.
 
====G Files====
G files specify a file meant for a specific group. G files are used by creating a file called <filename>.GXX_<groupname> in the directory where the file would normally reside. The XX value should be replaced with a priority number between 1 and 99. The priority indicates which file would take precedence if a specific host exists in multiple groups and is attempting to determine which file it should get.
 
 
====H Files====
 
H file specify a file meant for a specific host. H files are used by creating a file called <filename>.H_<FQDN>. H files should only be files who's content are totally unique to that file, such as certificates or keys. If there are minor changes required, such as usernames, hostnames or the like the better option is to use a templating system such as [[#TCheetah|TCheetah]]. H files always take priority over G files.
===Metadata===
1
edit

Navigation menu