2020-07-03 16:21:49 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set _crash_handler_called before restart
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
_crash_handler_called: true
|
2020-07-03 16:21:49 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Restart the ceph-crash service # noqa: ignore-errors
|
|
|
|
ansible.builtin.systemd:
|
2021-03-03 22:43:50 +08:00
|
|
|
name: ceph-crash@{{ ansible_facts['hostname'] }}
|
2020-07-03 16:21:49 +08:00
|
|
|
state: restarted
|
2024-02-14 18:14:02 +08:00
|
|
|
enabled: true
|
|
|
|
masked: false
|
|
|
|
daemon_reload: true
|
2020-07-03 16:21:49 +08:00
|
|
|
ignore_errors: true
|
|
|
|
when: hostvars[inventory_hostname]['_crash_handler_called'] | default(False) | bool
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set _crash_handler_called after restart
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
_crash_handler_called: false
|