Try using the full qualification @(master.info_....) Lebel, Marco wrote: > Hello all, > > > > I have the following : > > > > bundle agent master > > { > > vars: > > "info_provider[gatherer1]" slist => { "provider1", "provider2", > "provider3" }; > > "info_provider[gatherer2]" slist => { "provider4", "provider5", > "provider6" }; > > > > "info_gatherers" slist => getindices("info_provider"); > > > > methods: > > "gathering" usebundle => > do_gather("$(info_gatherers)","@(info_provider[$(info_gatherers)])"); > > > > reports: > > someserverclass:: > > "The client list for server $(info_gatherers) are > $(info_provider[$(info_gatherers)])"; > > } > > > > bundle agent do_gather(server,client_list) > > { > > files: > > "$(dir.export)" > > depth_search => recurse("inf"), > > file_select => include(".*"), > > action => if_elapsed("60"), > > ifvarclass => $(server), > > copy_from => rcp("$(dir.export)", "$(client_list)"); > > } > > > > I am basically trying to provide to the target bundle(do_gather) a > server name and a list of client system to contact. The > $(info_gatherers) properly iterate but the second parameter > @(info_provider[$(info_gatherers)]) does not convert to the list of > client associated with the server being iterated. > > > > I guess I am asking what is it that I do not understand since to me the > @(info_provider[$(info_gatherers)]) expression should return the list of > client system associated with the current value of the iteration over > the $(info_gatherers) list. > > > > Thanks, > > > > p.s. I will be happy with a different approach… right now I have coded > the iteration itself… lets say not elegant. Basically the goal is to > specify a list of gatherer each having an associated list list of > provider… the number of gatherer and provider will vary frequently over > time hence my hope to have it define in vars!!!! > > > > Marco > > > ------------------------------------------------------------------------ > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine
-- Mark Burgess ------------------------------------------------- Professor of Network and System Administration Oslo University College, Norway Personal Web: http://www.iu.hio.no/~mark Office Telf : +47 22453272 ------------------------------------------------- _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine