Hello, I'm trying to use what I founded in the reference manual[1] like this: body common control { bundlesequence => { "test" }; version => "0.0.1"; }
bundle agent test { vars: any:: "list" slist => {"0", @(l1), @(l2)}; Class1:: "l1" slist => {"1", "2"}; Class2:: "l2" slist => {"3", "4"}; commands: "/bin/echo $(list)"; } "cf-agent -KI" gives: Q: ".../bin/echo 0": 0 Q: ".../bin/echo @(l1)": @(l1) Q: ".../bin/echo @(l2)": @(l2) when "cf-agent -KI -DClass1" gives: Q: ".../bin/echo 0": 0 Q: ".../bin/echo 1": 1 Q: ".../bin/echo 2": 2 Q: ".../bin/echo @(l2)": @(l2) Is there a way to discard undefined variables? Regards. Footnotes: [1] http://www.cfengine.org/manuals/cf3-reference.html#List-variable-substitution-and-expansion -- Daniel Dehennin Récupérer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
pgpkwAlXQ213S.pgp
Description: PGP signature
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine