help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cfengine] Question about defining classes


From: Greg Haygood
Subject: RE: [cfengine] Question about defining classes
Date: Wed, 26 Mar 2003 16:42:55 -0500

Just prefix the classes to exclude with a '-':

        hosts_colored_beige = ( allhosts -hosts_colored_red
-hosts_colored_blue )

Not sure offhand if/where it's documented.  But this works in my config.

-g

-----Original Message-----
From: help-cfengine-bounces+ghaygood=brightlane.com@gnu.org
[mailto:help-cfengine-bounces+ghaygood=brightlane.com@gnu.org] On Behalf Of
Chip Seraphine
Sent: Wednesday, March 26, 2003 3:02 PM
To: Help-cfengine@gnu.org
Subject: [cfengine] Question about defining classes


This seems like a pretty basic syntactical question, but I somehow 
managed to need help with it anyway :-).  If this exact issue is covered 
in some documentation somewhere, please direct me to it and I will 
happily go RTFM.

Anyway.... I am trying to define  various classes for the machines in my 
environment that describe their characteristics (e.g. use_cups, 
use_xinetd, have_scsi_devices, etc).  I am ending up with a lot of 
situations like this:

groups:
    site1hosts = ( hewey dewey louie screwey )
    site2hosts = ( foo bar qux quux )
    allhosts = ( site1hosts site2hosts )

    hosts_colored_blue = ( dewey )
    hosts_colored_red = ( site2hosts )  #all boxes in site2 is painted red

So far, so good.  The problem comes when I want to set a group class as 
being everybody in group X except for Y and Z:

    #I know this is bad syntax, I am just trying to demonstrate what I 
want to do
    hosts_colored_beige = ( allhosts - ( hosts_colored_red + 
hosts_colored_blue ) )

What is the best way to do something like this?  I know that I could 
define hosts_not_colored_beige as being the union of hosts_colored_red 
and blue, but that doesn't solve my problem.

AtDhVaAnNkCsE,

-Chip





_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://mail.gnu.org/mailman/listinfo/help-cfengine






reply via email to

[Prev in Thread] Current Thread [Next in Thread]