Skip to content

Commit

Permalink
Merge pull request #24 from emersondispatch/master
Browse files Browse the repository at this point in the history
Remove for-loop in extra-plugin template
  • Loading branch information
dj-wasabi authored Feb 21, 2017
2 parents e29aa87 + 128faa5 commit 35b594c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@
- name: "Copy telegraf extra plugins"
template:
src: "telegraf-extra-plugin.conf.j2"
dest: "/etc/telegraf/telegraf.d/{{ item.plugin }}.conf"
dest: "/etc/telegraf/telegraf.d/extra-plugins.conf"
owner: telegraf
group: telegraf
mode: 0640
with_items: "{{ telegraf_plugins_extra }}"
when: "telegraf_plugins_extra is defined and telegraf_plugins_extra is iterable"
become: yes
notify: "Restart Telegraf"
1 change: 0 additions & 1 deletion templates/telegraf-extra-plugin.conf.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{% if telegraf_plugins_extra is defined and telegraf_plugins_extra is iterable %}
{% for item in telegraf_plugins_extra %}
[[inputs.{{ item.plugin }}]]
Expand Down

0 comments on commit 35b594c

Please sign in to comment.