feat: add reload handler
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2021-06-05 22:54:19 +02:00
parent 841f32d3c0
commit af97c37a71
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 12 additions and 2 deletions

View File

@ -8,3 +8,11 @@
listen: __alertmanager_restart
become: True
become_user: root
- name: Reload Alertmanager Service
service:
name: alertmanager
state: reloaded
listen: __alertmanager_restart
become: True
become_user: root

View File

@ -45,7 +45,7 @@
group: "{{ alertmanager_user }}"
mode: 0600
validate: "{{ alertmanager_base_dir }}/amtool check-config %s"
notify: __alertmanager_restart
notify: __alertmanager_reload
- name: Copy alertmanager web config file
template:
@ -54,6 +54,7 @@
owner: "{{ alertmanager_user }}"
group: "{{ alertmanager_user }}"
mode: 0640
notify: __alertmanager_reload
- name: Copy custom Alertmanager template files
copy:
@ -65,7 +66,7 @@
with_fileglob: "{{ alertmanager_template_files }}"
loop_control:
label: "{{ item | basename }}"
notify: __alertmanager_restart
notify: __alertmanager_reload
- name: Copy systemd unit file
template:

View File

@ -28,5 +28,6 @@
mode: "0750"
loop_control:
label: "{{ item.dest }}"
notify: __alertmanager_reload
become: True
become_user: "{{ alertmanager_user }}"