For me, the following bundle:

bundle agent atest {

vars:

"mylist[a]" string => "1";
"mylist[b]" string => "2";
"mylist[c]" string => "3";

"mykeys" slist => getindices("mylist");

"myarray[$(mykeys)]" string => execresult("/usr/bin/ps -f | grep $(mylist[$(mykeys)])","useshell");
}

Produces the following errors:

$ cf-agent -KI -f ./testbundle.cf
Truncating long file /opt/atws/files/BUILT4 in readfile to max limit 4
!! Duplicate selection of value for variable "myarray[a]" in scope atest
Rule from ./roles/vnc.cf at/before line 27
!! Duplicate selection of value for variable "myarray[b]" in scope atest
Rule from ./roles/vnc.cf at/before line 27
!! Duplicate selection of value for variable "myarray[c]" in scope atest
Rule from ./roles/vnc.cf at/before line 27

Can anyone else replicate this? And/or tell me what the issue is?

I am using stock 3.04 on Solaris10/SPARC.

Cheers
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to