2020-07-03 16:21:49 +08:00
|
|
|
---
|
|
|
|
- name: set _crash_handler_called before restart
|
|
|
|
set_fact:
|
|
|
|
_crash_handler_called: True
|
|
|
|
|
|
|
|
- name: restart the ceph-crash service
|
|
|
|
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
|
|
|
|
enabled: yes
|
|
|
|
masked: no
|
|
|
|
daemon_reload: yes
|
|
|
|
ignore_errors: true
|
|
|
|
when: hostvars[inventory_hostname]['_crash_handler_called'] | default(False) | bool
|
|
|
|
|
|
|
|
- name: set _crash_handler_called after restart
|
|
|
|
set_fact:
|
|
|
|
_crash_handler_called: False
|