Cfengine configuration directory

Structuring the cfagent.conf file

Relevant classes: any

If your configuration is getting large, you should think about splitting it up into logical modules. There is a recommended way to do this. Cfagent does not read imports like the include directives in other languages. It saves them until the end of the main file and reads them one by one. That means that any declarations that are made in imported files will not be seen by the the main file.

If you are going to import any files, then it is recommended that you import everything, with basic definitions coming first and specializations last.

Here is what a cfagent.conf file should look like.

###
#
# BEGIN cfagent.conf (Only hard classes in this file )
#
###

import:

   #
   # Split things up to keep things tidy
   #

Relevant classes:

any:: cf.groups cf.main cf.environ nexus:: cf.examsys any.!excepthost:: cf.site cf.services cf.motd cf.printer cf.www cf.mail hpux:: cf.hpux debian.!matrix:: cf.debian redhat:: cf.redhat SuSE:: cf.suse solaris:: cf.solaris sun4:: cf.sun4 ultrix:: cf.ultrix freebsd:: cf.freebsd homemachines:: cf.users matrix:: cf.matrix ### # # END cfagent.conf # ###
Back to documentation