add telegraf.d support

This commit is contained in:
2020-01-05 16:44:37 -06:00
parent b39e213bc3
commit 4fc6c1ab78
2 changed files with 52 additions and 0 deletions

View File

@ -25,6 +25,18 @@
mode: 0644
notify: reload telegraf
- name: configure telegraf.d files
template:
src: telegraf_d.conf.j2
dest: "/etc/telegraf/telegraf.d/{{ '%02d' | format(idx) }}-{{ item.name }}.conf"
owner: root
group: root
mode: 0644
notify: reload telegraf
loop: "{{ telegraf_config_d | default([]) }}"
loop_control:
index_var: idx
- name: create systemd override directory
file:
path: /etc/systemd/system/telegraf.service.d