feat: add reload handler
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2021-06-05 17:21:20 +02:00
parent 1dd4043ae3
commit cb5e5aa8a1
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 13 additions and 2 deletions

View File

@ -8,3 +8,13 @@
listen: __telegraf_restart listen: __telegraf_restart
become: True become: True
become_user: root become_user: root
- name: Reload Telegraf
service:
name: telegraf
state: reloaded
daemon_reload: yes
enabled: yes
listen: __telegraf_reload
become: True
become_user: root

View File

@ -32,7 +32,7 @@
with_fileglob: "{{ telegraf_template_files }}" with_fileglob: "{{ telegraf_template_files }}"
loop_control: loop_control:
label: "{{ item | basename | splitext | first }}" label: "{{ item | basename | splitext | first }}"
notify: __telegraf_restart notify: __telegraf_reload
- name: Add docker group - name: Add docker group
user: user:
@ -49,7 +49,7 @@
owner: telegraf owner: telegraf
group: root group: root
mode: 0600 mode: 0600
notify: __telegraf_restart notify: __telegraf_reload
- name: Ensure Telegraf is up and running - name: Ensure Telegraf is up and running
service: service:

View File

@ -25,5 +25,6 @@
mode: "0750" mode: "0750"
loop_control: loop_control:
label: "{{ item.dest }}" label: "{{ item.dest }}"
notify: __telegraf_reload
become: True become: True
become_user: root become_user: root