[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: importing files
From: |
Russell Adams |
Subject: |
Re: importing files |
Date: |
Mon, 14 Mar 2005 18:05:50 -0600 |
User-agent: |
Mutt/1.4.2.1i |
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
RLAdams@AdamsInfoServ.com
http://www.adamsinfoserv.com/
- importing files, Dustin Sorge, 2005/03/14
- RE: importing files, Atom Powers, 2005/03/15
- Re: importing files, Dustin Sorge, 2005/03/15
- Re: importing files, Edward F. Brown, 2005/03/15
- Re: importing files, Tim Nelson, 2005/03/16
- Re: importing files, Frank Smith, 2005/03/16
- Re: importing files, Ed Brown, 2005/03/16
- Re: importing files, Tim Nelson, 2005/03/16