Forum: Cfengine Help
Subject: Re: variable expansion inside a single bundle
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,18819,18820#msg-18820
Please post a full example next time.
######################
body common control {
bundlesequence => { "test" };
}
bundle common g {
classes:
"all" expression => "any";
}
bundle agent test {
vars:
"array1" string => "something11";
"array1" string => "something12";
"array2" string => "something21";
"array2" string => "something22";
"all_user" slist => getindices("array1");
"all_user_in_a_single_string_with" string => join(" ", "all_user");
reports:
all::
"${all_user_in_a_single_string_with}";
}
nwat...@tofrcpl58903 ~/.cfagent/inputs $ cf-agent.exe -f ./bar.cf
R: user1 user2
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine