Forum: CFEngine Help Subject: Re: False report of "no constrants" in constrained classes promises. Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,27501,27526#msg-27526
There's no action for a classes promise with nothing in the body but an "ifvarclass" because of the way ifvarclass is evaluated. A classes promise sets the class if the action in the body is true - but there is no action to observe. You've asked Schrodinger's cat to decide whether or not the class should be set. :) Mark's "or" suggestion is probably more efficient in this case, but if you must use "ifvarclass" for whatever reason (I can think of a couple), you can stick an or => { "any" } in there so that there's an action; a "thing to do". _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine