Jason Edgecombe wrote:
you can do exactly what you suggest.
here would be a snippet from update.conf:
#----------------------------------------
AllowRedefinitionOf = ( policyhost )
!192.168::
policyhost = ( host1.mydomain.com )
192_168::
policyhost = ( host2.int.mydomain.com )
#----------------------------------------
Actually this was the very first thing I tried. But I had two problems:
First, there is no 192_168 class. I cut and pasted the "Defined Classes
= " section of cfagent -v output into a text editor and did a search to
make sure I was not missing it. There are 192_168_1 and 192_168_2 etc
classes defined but not just a single 192_168. We use a number of
subnets from the 192_168 network so this is a bit of a problem. It would
be really nice if I could do 192_168 and !192_168 and easily divide the
hosts into one of these two classes. I know I could use iprange to
define my own class but I am trying to stick with using the built in
automatically determined classes rather than defining my own all the
time. Seems like every time I define my own I then find that cfengine
has a built in class for it.
Second problem is that when I do try this approach using 192_168_1 by
putting this my in cfagent.conf and update.conf files:
192_168_1::
policyhost = ( sdapp01 )
So all machines on the 192_168_1 network should get their policy from
sdapp01. But when I run it with this configuration I get these errors:
*********************************************************************
Update Sched: copy pass 1 @ Thu May 11 11:21:55 2006
*********************************************************************
Checking copy from $(policyhost):/dj/data/cfengine/inputs to
/var/cfengine/inputs
cfengine:: Unable to find hostname or cfengine service:
($(policyhost)/5308) Name or service not known
cfengine:: Couldn't open a socket
cfengine:: Unable to establish connection with $(policyhost) (failover)
I notice this happens before it lists the defined clases. Is 192_168_1
not defined at this point or something?
--
Tracy R Reed
http://ultraviolet.org
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
http://cfengine.org/mailman/listinfo/help-cfengine