body common control { bundlesequence => {"main",}; } bundle agent main{ vars: "mybundles" slist => { "handler1","handler2" }; "myvalues" slist => { "value1", "value2" }; methods: "$(mybundle)" usebundle => handler_iterator("$(mybundles)", "@(main.myvalues)"); } bundle agent handler_iterator(handler, values) # This expects a single value { methods: "$(handler)" usebundle => $(handler)("@(handler_iterator.values)"); } bundle agent handler1(value1) { reports: cfengine:: "in bundle agent handler1: I got $(value1)"; } bundle agent handler2(value1) { reports: cfengine:: "in bundle agent handler2: I got $(value1)"; }