Hello,

Funny thing, as I bumped into that today, using 3.1.4. With my own 
policy, but here are my discoveries.
> bundle agent test(param){
> vars:
>     debug::
>       "filename" string => "/tmp/debug";
>
>     !debug::
>       "filename" string => "/tmp/nodebug";
>
> classes:
>     "debug" expression => regcmp("(?i)yes|true|on", "$(param)");
Normal ordering specifies that vars are run before classes. So before 
anything else happens below this, debug is not declared, so "filename" 
is set to "/tmp/nodebug".

Then, the class debug is declared, on the second CFEngine iteration this 
should point that "filename" var is to be redefined to "/tmp/debug". 
However, the default "vars" policy is "constant", as per:
https://cfengine.com/manuals/cf3-Reference#policy-in-vars
so it cannot be redefined, but it is supposed to, thus the warning about 
re-declaration.

I hope this clears things out.

Cheers,
Ballock
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to