Seems to work the same on Community 3.0.2 and 3.0.3. [r...@unxxhd01 inputs]# /home/nwatson/src/cfengine-3.0.3/src/cf-agent -f ./test.cf R: Server = g1 Client_list = p1 R: Server = g1 Client_list = p2 R: Server = g1 Client_list = p3 List parameter not found while constructing "do_gather" - use @(scope.variable) in calling reference R: Server = $(idx) Client_list = @(master.ip[$(idx)]) R: The client list for server g1 are $(ip[g1]) R: The client list for server g2 are $(ip[g2])
[r...@unxxhd01 inputs]# cat test.cf ###################### body common control { bundlesequence => { "master" }; } bundle agent master { vars: "ip[g1]" slist => { "p1", "p2", "p3" }; "ip[g2]" slist => { "p4", "p5", "p6" }; "idx" slist => getindices("ip"); methods: "gathering" usebundle => do_gather( "$(idx)", #"$(ip[$(idx)])" "@(master.ip[$(idx)])" ); reports: linux:: "The client list for server $(idx) are $(ip[$(idx)])"; } bundle agent do_gather(server,clients){ reports: linux:: "Server = ${server} Client_list = ${clients}"; } Sincerely, -- Neil Watson 416-673-3465
CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. AVERTISSEMENT RELATIF À LA CONFIDENTIALITÉ Ce message, ainsi que les pièces qui y sont jointes, est destiné à l’usage exclusif de la personne à laquelle il s’adresse et peut contenir de l’information personnelle ou confidentielle. Si le lecteur de ce message n’en est pas le destinataire, nous l’avisons par la présente que toute diffusion, distribution, reproduction ou utilisation de son contenu est strictement interdite. Veuillez avertir sur-le-champ l’expéditeur par retour de courrier électronique et supprimez ce message ainsi que toutes les pièces jointes.
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine