[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: defining large groups by domain name
From: |
Brendan Strejcek |
Subject: |
Re: defining large groups by domain name |
Date: |
Fri, 12 Mar 2004 11:10:50 -0600 |
User-agent: |
Mutt/1.3.28i |
rader@ginseng.hep.wisc.edu wrote:
> AddInstallables = ( specialclass )
What is this specialclass thing?
> groups:
> g3_node_bugus = ( PrepModule(HostMatch, "ginseng g3_node") )
You have the syntax wrong. PrepModule(HostMatch,ginseng g3_node) works
for me.
$ hostname
belmont.cs.uchicago.edu
$ cat ~/.cfagent/modules/HostMatch
#!/usr/bin/perl
if ( `hostname` =~ /$ARGV[0]/ ) { print "+$ARGV[1]\n"; }
$ cat test.cf
#!/usr/sbin/cfagent --no-splay --inform --no-lock --file
groups: g3_node_bugus = ( PrepModule(HostMatch,belmont g3_node) )
control: actionsequence = ( shellcommands )
shellcommands: g3_node:: "/bin/echo g3_node is defined"
# end test.cf
$ ./test.cf
cfengine:: Executing script /bin/echo g3_node is
defined...(timeout=0,uid=-1,gid=-1)
cfengine::/bin/echo g3_no: g3_node is defined
cfengine:: Finished script /bin/echo g3_node is defined
$
Example was 2.1.3 running on Debian stable.
> And, besides, they sytax above is ugly and I've already written
> the code for
>
> groups:
> g3_compute_nodes = ( HostRange(g3,01-35) )
If that works for you, that's cool.
-- Brendan
Re: defining large groups by domain name, John Sechrest, 2004/03/12
Re: defining large groups by domain name, Tod Oace, 2004/03/12