Seva It was just a proof of concept and i do not totally agree with you. Not everybody should be able to place files in the cfengine directory. You could make a separate directory were you could place the files that you always want to include. The last one is the bundlesequence determines which bundles will be executed and not the files that are included. Only if you overwrite the bundlesequence and it is allowed to override it. But that you can control with the promises.cf file.
You are right is up to the admin what he/she wants! On 17 feb 2011, at 06:33, Seva Gluschenko wrote: > Bas, > > this way one has no control about .cf files, i.e. any .cf file > downloaded will be included that may be undesirable. For lazy setups > it should work, though. > > 2011/2/16 Bas van der Vlies <[email protected]>: >> >> On 16 feb 2011, at 20:44, [email protected] wrote: >> >> Forum: Cfengine Help >> Subject: .cf file includes? >> Author: bubble1975 >> Link to topic: https://cfengine.com/forum/read.php?3,20701,20701#msg-20701 >> >> Greetings all, >> >> I was wondering if there was a clean way of being able to simply include >> *.cf in the "promises.cf -> inputs" stanza instead of hardcoding every >> single .cf file you want to use specifically? Sort of like an 'include >> directory' like apache uses? We're going to be adding a lot of unique .cf >> files, and the list will get long, so I was hoping there would be a >> 'catchall' way to just include them all...? >> >> Or maybe a way to call a script that feeds 'ls /var/cfengine/inputs/*.cf" >> into an slist variable or something, and then do: >> >> inputs => { >> "$(control.cf_file_list)" >> } >> >> >> this may work, it is used on one of our clusters: >> {{{ >> bundle common global{ >> vars: >> "workdir" string => "/var/lib/cfengine3"; >> "currentcf" string => execresult("/usr/bin/find $(workdir)/inputs/ -name >> *.cf ! -name promises.cf ! -name failsafe.cf","noshell"); >> "cflist" slist => splitstring($(currentcf),"\n","50"); >> } >> body common control { >> inputs => { >> @(global.cflist) >> }; >> } >> >> -- >> Bas van der Vlies >> [email protected] >> >> >> >> _______________________________________________ >> Help-cfengine mailing list >> [email protected] >> https://cfengine.org/mailman/listinfo/help-cfengine >> >> > > > > -- > SY, Seva Gluschenko. -- Bas van der Vlies [email protected] _______________________________________________ Help-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/help-cfengine
