[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfengine-help
Subject:    Re: Feature request-- inverting subtractions in groups
From:       Chip Seraphine <chip () trdlnk ! com>
Date:       2004-06-25 19:11:33
Message-ID: 200406251411.33556.chip () trdlnk ! com
[Download RAW message or body]

On Friday 25 June 2004 13:55, you wrote:
> > do_automated_patching=		( !production Hr02 -!Friday )
> 
> What exactly would you expect from the above expression?
> Is it
> (all hosts not in production) + (all hosts in Hr02) - (all hosts not in 
> Friday)?

Exactly.
 
> If so, you can achive this already by
> 
> all_but_production = ( any -production )
> not_on_friday = ( any -Friday )
> do_automated_patching = ( all_but_production Hr02 -not_on_Friday )
> 
> Which is much easier to understand anyway IMHO.

I can also achieve it in several other ways.  It isn't a matter of being able 
to get it working (I'm already doing it), it's a convenience issue.  Having 
to define a new class for every invert is tedious in my opinion, and tends to 
result in cruft accumulation  in my configs.

I disagree that it is easier to understand.  Perhaps in that example, but that 
requires the leap of faith that the invert classes (like not_on_Friday) are 
always exactly what they appear to be.  Carefully choosing your class names 
will make that true much of the time, but in practice I find myself looking 
up the definitions of the invert classes often enough to make it an 
inconvenience.  !Friday is straightforward and unambiguous; I know there is 
no chance that some other admin who wished to delay a patchrun might have 
made a change that caused not_on_Friday to also exclude Saturdays, for 
instance.


-- 

Chip Seraphine
Unix Administrator
TradeLink, LLC
312-264-2048
chip@trdlnk.com



_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic