Hello friends
I’ve some lists of elements which contains values like plugin: “someplugin”, directive: “somedirective”. For reference see
Variables: https://github.com/valentinogagliardi/collectd/blob/master/README.md#example-playbook
Template: https://github.com/valentinogagliardi/collectd/blob/master/templates/collectd.conf.j2
At this moment I’m able to generate a configuration which take this form:
<Plugin “someplugin”>
somedirective
<Plugin “anotherplugin”>
anothersomedirective
What if I want to add more directives to the list?
plugins:
- { plugin: “someplugin”, directive: “somedirective” }
- { plugin: “anotherplugin”, directive: “somedirective”, directive_x: “anotherdirective” }
Is not clear to me how to loop over all elements when elements are not known in advance, in order to generate a configuration like this:
<Plugin “someplugin”>
somedirective
<Plugin “anotherplugin”>
somedirective
anotherdirective
Thanks in advance!