mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 20:03:04 +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
387 B
YAML
17 lines
387 B
YAML
---
|
|
- name: Restart prometheus
|
|
listen: "restart prometheus"
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
daemon_reload: true
|
|
name: prometheus
|
|
state: restarted
|
|
register: prometheus_restarted
|
|
|
|
- name: Reload prometheus
|
|
listen: "reload prometheus"
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
name: prometheus
|
|
state: reloaded
|
|
when: prometheus_restarted is not defined
|