Forum: Cfengine Help
Subject: methods and undeclared bundles
Author: matter
Link to topic: https://cfengine.com/forum/read.php?3,16646,16646#msg-16646
Greetings,
I would like to use usebundle to run a bundle, but only if a class is defined.
Consider the following promises:
##########################################################################
body common control {
bundlesequence => { "test" };
}
##########################################################################
bundle agent test {
methods:
"any" usebundle => undefined_bundle,
ifvarclass => "not_defined_at_all";
}
##########################################################################
The undefined_bundle does not exist, but the not_defined_at_all class is not
set, so this whole promises cannot be run. However, it appears cfengine (svn
908), still tries and verify the bundle's existence:
% cf-agent -Kf ./btest.cf
Undeclared promise bundle "undefined_bundle()" was referenced in a promise
Summarizing promises as text to ./btest.cf.txt
Summarizing promises as html to ./btest.cf.html
cf-agent was not able to get confirmation of promises from cf-promises, so
going to failsafe
Is this something that is not allowed? It would be nice to be able to do
something like this.
Thanks!
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine