Forum: CFEngine Help
Subject: Re: negating a class in policy
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,24467,24684#msg-24684
I don't think you can modify hard classes, which have_aptitude is. For the
particular case you want, I think the best would be as
On Thursday 05 January 2012 07:23:33 you wrote:
> While I don't know if it's possible to negate an existing class, if what
> you're trying to do is force cfengine to unconditionally use apt-get
> rather than aptitude, then you could copy the "body package_method apt"
> promise from the stdlib, a
Hi Diego, thanks for response.
On Wednesday 04 January 2012 17:37:03 Diego Zamboni wrote:
> To unconditionally undefined a class (which is what -N does) you could
> define it as an expression that always evaluates to false:
>
> classes:
> "class_to_undefine" not => "any";
I tried that, both w
Hi Michael
On Wed, Jan 04, 2012 at 02:51:48PM +, Michael Gliwinski said:
> bundle common g {
> classes:
> "have_aptitude" not => "have_aptitude";
> }
While I don't know if it's possible to negate an existing class, if what
you're trying to do is force cfengine to unconditionally use a
Michael,
To unconditionally undefined a class (which is what -N does) you could define
it as an expression that always evaluates to false:
classes:
"class_to_undefine" not => "any";
To negate an existing class (not necessarily undefining it), I don't think you
can do it on top of the same
Hi All,
Is there a way to negate a class inside a .cf file the same way the -N CLI
option does?
I tried just re-defining a class, but it does not seem to have any effect.
Also couldn't find any clues in docs and/or archives.
# promises.cf
body common control {
bundlesequence => { "foo" };