Hi all
Il 30/10/2011 20:42, no-re...@cfengine.com ha scritto: > "server_list" slist => { "server1", "server2", "server3" }; > "temporary_string" > string => join(" iburst$(const.endl)server ","server_list"); > "optional2" string => "server $(temporary_string) iburst"; [...] > string => concat("server ", join(" iburst$(const.endl)server ", > "server_list"), " iburst") OK, I got this to work. Not that I am fond of this kind of chicanery when creating lists from lists, e.g.: list1 slist => { "a", "b", "c" } list2 slist => { "Say hello to letter $(list1) } ; and expanding lists in templates will do, but that's how it is, I guess. Anyway, as Neil anticipated, my ntp bundle in ntp.cf is getting bigger and bigger, so I decided to split it in manageable chunks using methods. To my surprise, the sub-bundles lost visibility of the variables in the ntp bundle, even if fully qualified. This means that: 1) if previously the variable $(ntp.role) was correctly expanded in the template, now it's not (and I get a $(ntp.role) in its place) 2) if a variable was defined with a default value and policy => "free", and I try to redefine it in a sub-bundle (e.g.: $(ntp.role) string => "client"), the default value is expanded nonetheless. cfengine seems also quite confused, as it throws messages where the context is expanded twice like in: > Function "join" was promised a list called "ntp.ntp.peerlist" but this was > not (yet) found Is this behaviour expected? I would like to avoid to pass a big bunch of variables through the whole chain (it's 11 variables currently), but I don't seem I can find a proper way to do that. I also would like to avoid repeating the same pieces of codes over and over because it would become a maintenance nightmare... Thanks Ciao -- bronto _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine