Merge "Add support for custom telegraf configuration"
This commit is contained in:
commit
f7dfa20dd6
@ -25,12 +25,16 @@
|
|||||||
vars:
|
vars:
|
||||||
service: "{{ telegraf_services['telegraf'] }}"
|
service: "{{ telegraf_services['telegraf'] }}"
|
||||||
template:
|
template:
|
||||||
src: "telegraf.conf.j2"
|
src: "{{ item }}"
|
||||||
dest: "{{ node_config_directory }}/telegraf/telegraf.conf"
|
dest: "{{ node_config_directory }}/telegraf/telegraf.conf"
|
||||||
register: telegraf_confs
|
register: telegraf_confs
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[service.group]
|
- inventory_hostname in groups[service.group]
|
||||||
- service.enabled | bool
|
- service.enabled | bool
|
||||||
|
with_first_found:
|
||||||
|
- "{{ node_custom_config }}/telegraf/{{ inventory_hostname }}/telegraf.conf"
|
||||||
|
- "{{ node_custom_config }}/telegraf/telegraf.conf"
|
||||||
|
- "telegraf.conf.j2"
|
||||||
notify:
|
notify:
|
||||||
- Restart telegraf container
|
- Restart telegraf container
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user