Forum: CFEngine Help Subject: Re: CFEngine Help: Templating the solution? Author: tjavo87 Link to topic: https://cfengine.com/forum/read.php?3,26068,26301#msg-26301
Hi, I'm now working with methods but encounter a problem. I've a bundle named all that needs to run on every system. The files are parsed but then there is the message when running cf-agent in verbose mode; cf3> -> Bundlesequence => {'main'} cf3> cf3> ***************************************************************** cf3> BUNDLE main cf3> ***************************************************************** cf3> cf3> cf3> + Private classes augmented: cf3> cf3> - Private classes diminished: cf3> cf3> cf3> cf3> ========================================================= cf3> methods in bundle main (1) cf3> ========================================================= cf3> cf3> cf3> ......................................................... cf3> Promise's handle: cf3> Promise made by: "all" cf3> ......................................................... cf3> cf3> cf3> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * cf3> BUNDLE all cf3> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * cf3> cf3> Initiate variable convergence... cf3> cf3> ========================================================= cf3> vars in bundle all (1) cf3> ========================================================= cf3> cf3> cf3> + Private classes augmented: cf3> cf3> - Private classes diminished: cf3> cf3> cf3> cf3> ========================================================= cf3> vars in bundle all (2) cf3> ========================================================= cf3> cf3> cf3> + Private classes augmented: cf3> cf3> - Private classes diminished: cf3> cf3> cf3> cf3> ========================================================= cf3> vars in bundle all (3) cf3> ========================================================= cf3> cf3> cf3> + Private classes augmented: cf3> cf3> - Private classes diminished: cf3> cf3> cf3> ==> Zero promises executed for bundle "all" cf3> -> Method invoked successfully cf3> cf3> ......................................................... cf3> Promise's handle: cf3> Promise made by: "groupless" cf3> ......................................................... cf3> cf3> cf3> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * cf3> BUNDLE groupless cf3> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * cf3> cf3> Initiate variable convergence... cf3> cf3> + Private classes augmented: cf3> cf3> - Private classes diminished: cf3> cf3> cf3> cf3> ========================================================= cf3> methods in bundle groupless (1) cf3> ========================================================= Here is a part of my config; bundle agent main { methods: any:: "all" usebundle => "all"; groupless:: "groupless" usebundle => "groupless"; all.cf bundle agent all { methods: "all" usebundle => "all_garbage"; all_garbage.cf bundle agent all_garbage { files: Sunday.Hr12.Min00_05:: "$(sys.workdir)/cf_repair.log" comment => "Rotate the promises repaired logs each week", handle => "garbage_collection_files_cf_repair_log", rename => rotate("7"), action => if_elapsed("10000"); } Mark Burgess Wrote: ------------------------------------------------------- > Consider using this approach instead of the > bundlesequence > > https://cfengine.com/manuals/st-menus#How-do-you-c > reate-menus-with-CFEngine > > On 05/25/2012 09:17 AM, no-re...@cfengine.com > wrote: > > Forum: CFEngine Help > > Subject: Templating the solution? > > Author: tjavo87 > > Link to topic: > https://cfengine.com/forum/read.php?3,26068,26068# > msg-26068 > > > > Hi Guys, > > > > I'm working with dynamic bundlesequences as > described on the website from Neil, the first > solution. > > > > > > bundle common g { > > vars: > > > > any:: > > > > "bseq" slist => { > > "site", > > "ntp", > > "hard" > > }, > > policy => "free"; > > > > cf_dbs:: > > > > "bseq" slist => { > > @{bseq}, > > "db2", > > "mysql" > > }, > > policy => "free"; > > > > cf_webfarm:: > > > > "bseq" slist => { > > @{bseq}, > > "httpd", > > "proxy", > > "ntp" > > }, > > policy => "free"; > > } > > > > > > The code is copied from the website but with one > execption. Under the cf_webfarm I've also defined > the ntp bundlesequence. For the cf_webfarm class > there is an extra line added to the ntp file. > > > > The any class copies the default ntp file from > the server via secure_cp. And the class cf_webfarm > would add an extra line with bundle edit_line. But > now I've created a loop. > > Everytime cf-agent runs it checks the ntp file > under the any class and discovered the file is > changed, so the new original file is copied. After > that, the class cf_webfarm add the new line > because the file is restored. > > > > How can I resolve this issue? > > > > Thanx and Regards! > > > > _______________________________________________ > > Help-cfengine mailing list > > Help-cfengine@cfengine.org > > > https://cfengine.org/mailman/listinfo/help-cfengin > e > > -- > > CTO and Founder > CFEngine > > http://www.cfengine.com > http://www.markburgess.org > Twitter: @markburgess_osl, @CFEngine_news > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengin > e _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine