Forum: CFEngine Help Subject: Re: bug? ifvarclass in reports after any:: Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,23005,23032#msg-23032
Ramon, I tried following input body common control { bundlesequence => { "main" }; } bundle common g { classes: any:: "class_a" expression => "any"; } bundle agent main { vars: any:: "classname" string => "class_b"; classes: any:: "$(classname)" expression => "any"; reports: class_a:: "print: This should always be printed."; any:: "print: This should work." ifvarclass => "class_b"; "print: This should work." ifvarclass => "$(classname)"; } but cf-agent stops in policy validation phase and outputs reports promises may not be in class 'any' - risk of a notification explosion, near token 'ifvarclass' This is not the problem you described, but I'm still amazed. My complex configuration does work and this example doesn't. I couldn't figure out why. On the whole I think that the restriction is too strict, firstly because of the problem in question and secondly because I want some bundles to always report when they are called using 'methods' promises. Currently we are forced to use one wide reaching class (see Ben's response) to avoid the problem. However regarding to your first problem I often use verbose output (-v flag) to analyze if promises are triggered or not. Does this give you more insight? _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine