I created a file I want all my other config files to import to inherit groups and other settings. I call it CommonConfig.cf.
For normal operation, my cfagent.conf is nothing more than a list of imports, with CommonConfig.cf listed first so all subsequent imports inherit it. I use the following import statement in cfagent.conf AND at the top of all of my config files. This ensures that CommonConfig.cf is always imported, even if I run a configuration file separately from cfagent.conf. ###################################################################### # standard import import: !DefinedCommonControl:: /var/cfengine/inputs/lib/CommonControl.cf You'll note the class DefinedCommonControl which I use to prevent recursive imports. (which really happen and cause a runaway!) At the top of CommonConfig.cf, is the following: ###################################################################### # classes # # Here we define the class that says we've loaded this library. classes: any:: DefinedCommonControl = ( any ) Once defined, it will not be imported again. Russell On Mon, Mar 14, 2005 at 02:10:05PM -0500, Dustin Sorge wrote: > Hello, > I currently have a file (groups.cf) which defines a number of > groups. I want to be able to import this file into my cfagent.conf file > (as well as others). Since the groups can change I would rather make > the changes in one file and have it propagate to the others instead of > going through each file individually and modifying the groups. What > would the syntax be for importing this groups.cf file and referencing > the groups contained in it in my .conf files? Any suggestions would be > much appreciated. > > thank you, > -- Dustin Sorge > > > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@gnu.org > http://lists.gnu.org/mailman/listinfo/help-cfengine > ----------------------------- Russell Adams [EMAIL PROTECTED] http://www.adamsinfoserv.com/ _______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine