diff --git a/docker/services/ceph-ansible/ceph-mon.yaml b/docker/services/ceph-ansible/ceph-mon.yaml index 53e38b465f..c37c5e8591 100644 --- a/docker/services/ceph-ansible/ceph-mon.yaml +++ b/docker/services/ceph-ansible/ceph-mon.yaml @@ -86,3 +86,16 @@ outputs: - {get_attr: [CephBase, role_data, config_settings, ceph_common_ansible_vars]} - monitor_secret: {get_param: CephMonKey} admin_secret: {get_param: CephAdminKey} + update_tasks: + - block: + - name: Double check the mon systemd unit is not consistent with the current mon + shell: "systemctl is-active ceph-mon@*" + register: ceph_mon_status + ignore_errors: true + - name: Stop mons to make them consistent with systemd + shell: "docker stop ceph-mon-{{ ansible_hostname }}" + when: + - ceph_mon_status.rc != 0 + tags: common + when: + - step|int == 3