mirror of https://github.com/ceph/ceph-ansible.git
19 lines
576 B
YAML
19 lines
576 B
YAML
---
|
|
- name: Set _exporter_handler_called before restart
|
|
ansible.builtin.set_fact:
|
|
_exporter_handler_called: true
|
|
|
|
- name: Restart the ceph-exporter service # noqa: ignore-errors
|
|
ansible.builtin.systemd:
|
|
name: ceph-exporter@{{ ansible_facts['hostname'] }}
|
|
state: restarted
|
|
enabled: true
|
|
masked: false
|
|
daemon_reload: true
|
|
ignore_errors: true
|
|
when: hostvars[inventory_hostname]['_exporter_handler_called'] | default(False) | bool
|
|
|
|
- name: Set _exporter_handler_called after restart
|
|
ansible.builtin.set_fact:
|
|
_exporter_handler_called: false
|