[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Cfengine] cfagent.conf for clients in different subnets
From: |
Bas van der Vlies |
Subject: |
Re: [Cfengine] cfagent.conf for clients in different subnets |
Date: |
Tue, 13 May 2003 15:40:00 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1) Gecko/20030425 |
Garrett, Matt M SITI-ITDIEEE wrote:
Folks
I am using cfengine quite well.
Small problem in that half the clients are in one subnet and half in another
e.g 127.4.4.XXX 127.4.5.XXX
Currently my cfagent.conf file looks like
copy:
solaris::
/usr/local/cfengine/inputs/solaris/subnet1 dest=/
recurse=inf
server=WHAT_ever
/usr/local/cfengine/inputs/solaris/subnet2 dest=/
recurse=inf
server=WHAT_ever
What would be nice is just to have one input e.g
/usr/local/cfengine/inputs/solaris
File's in there to have some end tag to say they were part of subnet1 or subnet2
or no end tag to make the file on both subnets.
e.g
/usr/local/cfengine/inputs/solaris/etc/auto_master_#subnet1# >- copy to client
as /etc/auto_master
/usr/local/cfengine/inputs/solaris/etc/auto_master_#subnet2# >- copy to client
as /etc/auto_master
/usr/local/cfengine/inputs/solaris/etc/nsswitch.conf >- copy to
client as /etc/nsswitch.conf
If the above makes any sense ?
Any idea's if it is possible , and if so how.
If it make any difference I am using cfengine version 2.0.5
Thanks
You can do several things. You get a network class from cfengine, eg:
127.4.4
control:
127.4.4::
DIR = ( "subnet1" )
EXT = ( "subnet1" )
127.4.5::
DIR = ( "subnet2" )
EXT = ( "subnet2" )
copy:
/usr/local/cfengine/inputs/solaris/$DIR
dest=/
...
Another solution would be:
copy::
/usr/local/cfengine/inputs/solaris/
dest=/
exclude=*subnet1
exclude=*subnet2
for network special files do:
/usr/local/cfengine/inputs/solaris/etc/auto_master.$(EXT)
dest=/usr/local/cfengine/inputs/solaris/etc/auto_master
--
--
********************************************************************
* *
* Bas van der Vlies e-mail: basv@sara.nl *
* SARA - Academic Computing Services phone: +31 20 592 8012 *
* Kruislaan 415 fax: +31 20 6683167 *
* 1098 SJ Amsterdam *
* *
********************************************************************