mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
Added possibility to use pass, drop, tagpass, tagdrop and interval
This commit is contained in:
@ -30,11 +30,38 @@
|
|||||||
{% if telegraf_plugins_default is defined and telegraf_plugins_default is iterable %}
|
{% if telegraf_plugins_default is defined and telegraf_plugins_default is iterable %}
|
||||||
{% for item in telegraf_plugins_default %}
|
{% for item in telegraf_plugins_default %}
|
||||||
[{{ item.plugin }}]
|
[{{ item.plugin }}]
|
||||||
|
{% if item.interval is defined %}
|
||||||
|
interval = "{{ item.interval }}s"
|
||||||
|
{% endif %}
|
||||||
{% if item.config is defined and item.config is iterable %}
|
{% if item.config is defined and item.config is iterable %}
|
||||||
{% for items in item.config %}
|
{% for items in item.config %}
|
||||||
{{ items }}
|
{{ items }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if item.tagpass is defined and item.tagpass is iterable %}
|
||||||
|
[{{ item.plugin }}.tagpass]
|
||||||
|
{% for items in item.tagpass %}
|
||||||
|
{{ items }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if item.tagdrop is defined and item.tagdrop is iterable %}
|
||||||
|
[{{ item.plugin }}.tagdrop]
|
||||||
|
{% for items in item.tagdrop %}
|
||||||
|
{{ items }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if item.pass is defined and item.pass is iterable %}
|
||||||
|
[{{ item.plugin }}.pass]
|
||||||
|
{% for items in item.pass %}
|
||||||
|
{{ items }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if item.drop is defined and item.drop is iterable %}
|
||||||
|
[{{ item.plugin }}.drop]
|
||||||
|
{% for items in item.drop %}
|
||||||
|
{{ items }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -42,11 +69,38 @@
|
|||||||
{% if telegraf_plugins_extra is defined and telegraf_plugins_extra is iterable %}
|
{% if telegraf_plugins_extra is defined and telegraf_plugins_extra is iterable %}
|
||||||
{% for item in telegraf_plugins_extra %}
|
{% for item in telegraf_plugins_extra %}
|
||||||
[{{ item.plugin }}]
|
[{{ item.plugin }}]
|
||||||
|
{% if item.interval is defined %}
|
||||||
|
interval = "{{ item.interval }}s"
|
||||||
|
{% endif %}
|
||||||
{% if item.config is defined and item.config is iterable %}
|
{% if item.config is defined and item.config is iterable %}
|
||||||
{% for items in item.config %}
|
{% for items in item.config %}
|
||||||
{{ items }}
|
{{ items }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if item.tagpass is defined and item.tagpass is iterable %}
|
||||||
|
[{{ item.plugin }}.tagpass]
|
||||||
|
{% for items in item.tagpass %}
|
||||||
|
{{ items }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if item.tagdrop is defined and item.tagdrop is iterable %}
|
||||||
|
[{{ item.plugin }}.tagdrop]
|
||||||
|
{% for items in item.tagdrop %}
|
||||||
|
{{ items }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if item.pass is defined and item.pass is iterable %}
|
||||||
|
[{{ item.plugin }}.pass]
|
||||||
|
{% for items in item.pass %}
|
||||||
|
{{ items }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if item.drop is defined and item.drop is iterable %}
|
||||||
|
[{{ item.plugin }}.drop]
|
||||||
|
{% for items in item.drop %}
|
||||||
|
{{ items }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
Reference in New Issue
Block a user