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 <b...@sara.nl>: > > On 16 feb 2011, at 20:44, no-re...@cfengine.com 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 > b...@sara.nl > > > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine > > -- SY, Seva Gluschenko. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine