diff --git a/handlers/main.yml b/handlers/main.yml index 1a95b9a..db7eecf 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -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 diff --git a/tasks/setup.yml b/tasks/setup.yml index d6a96c5..50a620a 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -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: diff --git a/tasks/tls.yml b/tasks/tls.yml index dd17070..0e1db78 100644 --- a/tasks/tls.yml +++ b/tasks/tls.yml @@ -28,5 +28,6 @@ mode: "0750" loop_control: label: "{{ item.dest }}" + notify: __alertmanager_reload become: True become_user: "{{ alertmanager_user }}"