mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 03:43:09 +00:00
954a01d17c
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>
17 lines
403 B
YAML
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
|