[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request-- inverting subtractions in groups
From: |
Chip Seraphine |
Subject: |
Re: Feature request-- inverting subtractions in groups |
Date: |
Fri, 25 Jun 2004 14:11:33 -0500 |
User-agent: |
KMail/1.5.4 |
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