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