Forum: Cfengine Help Subject: A future feature suggestion Author: matter Link to topic: https://cfengine.com/forum/read.php?3,17881,17881#msg-17881
Greetings, I have been thinking about cfengine, and one item I would to do is run a particular .cf file as standalone, or as a part of a larger configuration. For example, consider the following two .cf files (promises.cf and standalone.cf): ==> promises.cf: <== ########################################################################## body common control { bundlesequence => { "standalone","local_bundle" }; inputs => { "standalone.cf" }; } ########################################################################## body server control { allowconnects => { "*" }; allowallconnects => { "*" }; trustkeysfrom => { "*" }; allowusers => { "root" }; cfruncommand => "$(sys.workdir)/bin/cf-agent -KB && $(sys.workdir)/bin/cf-agent"; } ########################################################################## bundle agent local_bundle { reports: cfengine3:: "I am local_bundle agent and my imagination is a monastery and I am its monk."; } ########################################################################## # # more promises.cf type of definition's contain in this file # ########################################################################## ==> standalone.cf <== ########################################################################## body common control { bundlesequence => { "standalone","something_else" }; } ########################################################################## bundle agent standalone { reports: cfengine_3:: "I am standalone agent, whose name was writ in water"; } ########################################################################## bundle agent something_else { reports: cfengine_3:: "I am something_else agent, nothing ever becomes real till it is experienced."; } ########################################################################## Whoa! There are two bundlesequences! Am I insane! If you could ignore all bundle sequences (and other promise.cf controls) except the one(s) contained in promises.cf, you could run "cf-agent" or "cf-agent -f standalone.cf" (or "cf-execd -Ff standalone.cf" for that matter). The "cf-agent" run would not run the "something_else" bundle as it is not in promises.cf bundle sequence. The "cf-agent -f standalone.cf" would run the "something_else' bundle as it is contained in the bundle sequence of standalone.cf Am I making any sense? It would be cool to run a single standalone.cf file (in this case) as standalone or part of promises.cf. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine