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

View File

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