Forum: CFEngine Help
Subject: Re: Define class based on "boolean" var
Author: nickanderson
Link to topic: https://cfengine.com/forum/read.php?3,26963,26964#msg-26964
I think it depends on what the best way to communicate the intention is.
I like to use regcmp because I think it makes the policy easier to read. But
whatever communicates the intention most clearly is in my opinion the "best"
way.
vars:
"debug" string => "on"; # Enable debug by setting variable to true, or on
(case insensitive)
classes:
"debug_on" expression => regcmp("(?i)true|on", "$(debug)");
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine