Forum: CFEngine Help Subject: Variables defined in other agent bundles that are not activated Author: nickanderson Link to topic: https://cfengine.com/forum/read.php?3,26072,26072#msg-26072
Last night I noticed some behavior that was un-expected. I found that I could reference a variable from another agent bundle without the other agent bundle being activated. In this example I report on the value of meta_main.variable but meta_main is not listed in the bundlesequence, nor is it activated with usebundle prior to the report. Is this intended behavior or is it a bug? I would have expected this with a common bundle since they do not need to be manually activated to be evaluated but not with an agent bundle. The output is the same (as expected) if the agent bundle is changed to a common bundle. This is on CFEngine Core 3.3.0. I have not tested it on the latest release yet. https://gist.github.com/2788783 body common control { bundlesequence => { "main", }; inputs => { "cfengine_stdlib.cf", }; } bundle agent main { reports: cfengine:: "$(meta_main.variable)"; } bundle agent meta_main { vars: "variable" string => "meta_main_variable_value"; } Output R: meta_main_variable_value _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine