[Top][All Lists]

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

Question about defining classes

From: Chip Seraphine
Subject: Question about defining classes
Date: Wed, 26 Mar 2003 14:02:04 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.2.1) Gecko/20030121

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:

   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.



reply via email to

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