mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
Convert the telegraf_plugins_extra varaible to a hash so that we can merge the hashes of multiple var files
This commit is contained in:
@ -1,47 +1,47 @@
|
||||
### MANAGED BY {{ role_path|basename }} ANSIBLE ROLE ###
|
||||
|
||||
[[inputs.{{ item.plugin }}]]
|
||||
{% if item.interval is defined %}
|
||||
interval = "{{ item.interval }}s"
|
||||
[[inputs.{{ item.key }}]]
|
||||
{% if item.value.interval is defined %}
|
||||
interval = "{{ item.value.interval }}s"
|
||||
{% endif %}
|
||||
{% if item.config is defined and item.config is iterable %}
|
||||
{% for items in item.config %}
|
||||
{% if item.value.config is defined and item.value.config is iterable %}
|
||||
{% for items in item.value.config %}
|
||||
{{ items }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if item.tags is defined and item.tags is iterable %}
|
||||
[inputs.{{ item.plugin }}.tags]
|
||||
{% for items in item.tags %}
|
||||
{% if item.value.tags is defined and item.value.tags is iterable %}
|
||||
[inputs.{{ item.key }}.tags]
|
||||
{% for items in item.value.tags %}
|
||||
{{ items }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if item.tagpass is defined and item.tagpass is iterable %}
|
||||
[{{ item.plugin }}.tagpass]
|
||||
{% for items in item.tagpass %}
|
||||
{% if item.value.tagpass is defined and item.value.tagpass is iterable %}
|
||||
[{{ item.key }}.tagpass]
|
||||
{% for items in item.value.tagpass %}
|
||||
{{ items }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if item.tagdrop is defined and item.tagdrop is iterable %}
|
||||
[{{ item.plugin }}.tagdrop]
|
||||
{% for items in item.tagdrop %}
|
||||
{% if item.value.tagdrop is defined and item.value.tagdrop is iterable %}
|
||||
[{{ item.key }}.tagdrop]
|
||||
{% for items in item.value.tagdrop %}
|
||||
{{ items }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if item.pass is defined and item.pass is iterable %}
|
||||
[{{ item.plugin }}.pass]
|
||||
{% for items in item.pass %}
|
||||
{% if item.value.pass is defined and item.value.pass is iterable %}
|
||||
[{{ item.key }}.pass]
|
||||
{% for items in item.value.pass %}
|
||||
{{ items }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if item.drop is defined and item.drop is iterable %}
|
||||
[{{ item.plugin }}.drop]
|
||||
{% for items in item.drop %}
|
||||
{% if item.value.drop is defined and item.value.drop is iterable %}
|
||||
[{{ item.key }}.drop]
|
||||
{% for items in item.value.drop %}
|
||||
{{ items }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if item.specifications is defined and item.specifications is iterable %}
|
||||
[[{{item.plugin}}.specifications]]
|
||||
{% for items in item.specifications %}
|
||||
{% if item.value.specifications is defined and item.value.specifications is iterable %}
|
||||
[[{{item.key}}.specifications]]
|
||||
{% for items in item.value.specifications %}
|
||||
{{ items }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user