Can anyone reproduce the following? It seems like a bug that is
preventing iterating over an array element when interpolating the index.
body common control {
bundlesequence => { "test" };
}
bundle agent test {
vars:
"an_slist" string => "an_slist";
"foo[$(an_slist)]" slist => { "abc", "def" };
reports:
linux::
"Not interpolating the array index";
"foo[an_slist] is $(foo[an_slist])";
"";
"Interpolating the array index";
"foo[an_slist] is $(foo[$(an_slist)])";
}
[r...@gdcscf3lgmt01 masterfiles.devel]# cf-agent -Kf ./test.var.cf
R: Not interpolating the array index
R: foo[an_slist] is abc
R: foo[an_slist] is def
R:
R: Interpolating the array index
R: foo[an_slist] is $(foo[an_slist])
[r...@gdcscf3lgmt01 masterfiles.devel]#
--
Justin C. Lloyd
Unix Infrastructure Engineer
DigitalGlobe, An Imaging and Information Company
This electronic communication and any attachments may contain confidential and
proprietary
information of DigitalGlobe, Inc. If you are not the intended recipient, or an
agent or employee
responsible for delivering this communication to the intended recipient, or if
you have received
this communication in error, please do not print, copy, retransmit, disseminate
or
otherwise use the information. Please indicate to the sender that you have
received this
communication in error, and delete the copy you received. DigitalGlobe reserves
the
right to monitor any electronic communication sent or received by its
employees, agents
or representatives.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine