ansible-collection-prometheus/roles/alertmanager/handlers/main.yml
SuperQ 954a01d17c
fix: Don't reload services when restarting
Avoid triggering a reload of various role services when a restart is
needed. This avoids the race between restart and reload.

Signed-off-by: SuperQ <superq@gmail.com>
2024-01-29 13:57:34 +01:00

17 lines
403 B
YAML

---
- name: Restart alertmanager
listen: "restart alertmanager"
become: true
ansible.builtin.systemd:
daemon_reload: true
name: alertmanager
state: restarted
register: alertmanager_restarted
- name: Reload alertmanager
listen: "reload alertmanager"
become: true
ansible.builtin.systemd:
name: alertmanager
state: reloaded
when: alertmanager_restarted is not defined