Wen copying/removing plugins show only plugin name

This commit is contained in:
Miroslav Prasil
2018-11-10 14:39:22 +00:00
parent f74ff634a7
commit 2fc672f09c

View File

@ -67,6 +67,8 @@
group: telegraf
mode: 0640
with_dict: "{{ telegraf_plugins_extra }}"
loop_control:
label: "{{ item.key }}"
when: "telegraf_plugins_extra is defined and telegraf_plugins_extra is iterable and item.value.state|default('present') != 'absent'"
become: yes
notify: "Restart Telegraf"
@ -76,6 +78,8 @@
path: "/etc/telegraf/telegraf.d/{{ item.key }}.conf"
state: absent
with_dict: "{{ telegraf_plugins_extra }}"
loop_control:
label: "{{ item.key }}"
when: "telegraf_plugins_extra is defined and telegraf_plugins_extra is iterable and item.value.state|default('present') == 'absent'"
become: yes
notify: "Restart Telegraf"