--- - name: Set _crash_handler_called before restart ansible.builtin.set_fact: _crash_handler_called: true - name: Restart the ceph-crash service # noqa: ignore-errors ansible.builtin.systemd: name: ceph-crash@{{ ansible_facts['hostname'] }} state: restarted enabled: true masked: false daemon_reload: true ignore_errors: true when: hostvars[inventory_hostname]['_crash_handler_called'] | default(False) | bool - name: Set _crash_handler_called after restart ansible.builtin.set_fact: _crash_handler_called: false