--- - name: check for a ceph mon socket shell: stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-mon*.asok changed_when: false failed_when: false register: mon_socket_stat when: - inventory_hostname in groups.get(mon_group_name, []) tags: - always - name: check if the ceph mon socket is in-use command: fuser --silent {{ mon_socket_stat.stdout }} changed_when: false failed_when: false register: mon_socket when: - inventory_hostname in groups.get(mon_group_name, []) - mon_socket_stat.rc == 0 tags: - always - name: remove ceph mon socket if exists and not used by a process file: name: "{{ mon_socket_stat.stdout }}" state: absent when: - inventory_hostname in groups.get(mon_group_name, []) - mon_socket_stat.rc == 0 - mon_socket.rc != 0 - name: check for a ceph osd socket shell: | stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-osd*.asok changed_when: false failed_when: false register: osd_socket_stat when: - inventory_hostname in groups.get(osd_group_name, []) tags: - always - name: check if the ceph osd socket is in-use command: fuser --silent {{ osd_socket_stat.stdout }} changed_when: false failed_when: false register: osd_socket when: - inventory_hostname in groups.get(osd_group_name, []) - osd_socket_stat.rc == 0 tags: - always - name: remove ceph osd socket if exists and not used by a process file: name: "{{ osd_socket_stat.stdout }}" state: absent when: - inventory_hostname in groups.get(osd_group_name, []) - osd_socket_stat.rc == 0 - osd_socket.rc != 0 - name: check for a ceph mds socket shell: | stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-mds*.asok changed_when: false failed_when: false register: mds_socket_stat when: - inventory_hostname in groups.get(mds_group_name, []) tags: - always - name: check if the ceph mds socket is in-use command: fuser --silent {{ mds_socket_stat.stdout }} changed_when: false failed_when: false register: mds_socket when: - inventory_hostname in groups.get(mds_group_name, []) - mds_socket_stat.rc == 0 tags: - always - name: remove ceph mds socket if exists and not used by a process file: name: "{{ mds_socket_stat.stdout }}" state: absent when: - inventory_hostname in groups.get(mds_group_name, []) - mds_socket_stat.rc == 0 - mds_socket.rc != 0 - name: check for a ceph rgw socket shell: | stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-client.rgw*.asok changed_when: false failed_when: false register: rgw_socket_stat when: - inventory_hostname in groups.get(rgw_group_name, []) tags: - always - name: check if the ceph rgw socket is in-use command: fuser --silent {{ rgw_socket_stat.stdout }} changed_when: false failed_when: false register: rgw_socket when: - inventory_hostname in groups.get(rgw_group_name, []) - rgw_socket_stat.rc == 0 tags: - always - name: remove ceph rgw socket if exists and not used by a process file: name: "{{ rgw_socket_stat.stdout }}" state: absent when: - inventory_hostname in groups.get(rgw_group_name, []) - rgw_socket_stat.rc == 0 - rgw_socket.rc != 0 - name: check for a ceph mgr socket shell: | stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-mgr*.asok changed_when: false failed_when: false register: mgr_socket_stat when: - inventory_hostname in groups.get(mgr_group_name, []) tags: - always - name: check if the ceph mgr socket is in-use command: fuser --silent {{ mgr_socket_stat.stdout }} changed_when: false failed_when: false register: mgr_socket when: - inventory_hostname in groups.get(mgr_group_name, []) - mgr_socket_stat.rc == 0 tags: - always - name: remove ceph mgr socket if exists and not used by a process file: name: "{{ mgr_socket_stat.stdout }}" state: absent when: - inventory_hostname in groups.get(mgr_group_name, []) - mgr_socket_stat.rc == 0 - mgr_socket.rc != 0 - name: check for a ceph rbd mirror socket shell: | stat --printf=%n {{ rbd_client_admin_socket_path }}/{{ cluster }}-client.rbd-mirror*.asok changed_when: false failed_when: false register: rbd_mirror_socket_stat when: - inventory_hostname in groups.get(rbdmirror_group_name, []) tags: - always - name: check if the ceph rbd mirror socket is in-use command: fuser --silent {{ rbd_mirror_socket_stat.stdout }} changed_when: false failed_when: false register: rbd_mirror_socket when: - inventory_hostname in groups.get(rbdmirror_group_name, []) - rbd_mirror_socket_stat.rc == 0 tags: - always - name: remove ceph rbd mirror socket if exists and not used by a process file: name: "{{ rbd_mirror_socket_stat.stdout }}" state: absent when: - inventory_hostname in groups.get(rbdmirror_group_name, []) - rbd_mirror_socket_stat.rc == 0 - rbd_mirror_socket.rc != 0 - name: check for a ceph nfs ganesha socket command: stat --printf=%n /var/run/ganesha.pid changed_when: false failed_when: false register: nfs_socket_stat when: - inventory_hostname in groups.get(nfs_group_name, []) tags: - always - name: check if the ceph nfs ganesha socket is in-use command: fuser --silent {{ nfs_socket_stat.stdout }} changed_when: false failed_when: false register: nfs_socket when: - inventory_hostname in groups.get(nfs_group_name, []) - nfs_socket_stat.rc == 0 tags: - always - name: remove ceph nfs ganesha socket if exists and not used by a process file: name: "{{ nfs_socket_stat.stdout }}" state: absent when: - inventory_hostname in groups.get(nfs_group_name, []) - nfs_socket_stat.rc == 0 - nfs_socket.rc != 0