purge: remove potential socket leftover

This commit ensure we remove any socket left by ceph and the
`ceph-osd-run.sh` script.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1861755

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 5e91e0f3e2)
pull/5708/head
Guillaume Abrioux 2020-09-11 17:30:33 +02:00 committed by Dimitri Savineau
parent f31258d604
commit a88f911155
2 changed files with 5 additions and 2 deletions

View File

@ -778,7 +778,7 @@
- ansible_pkg_mgr == 'apt'
- purge_all_packages == true
- name: remove config
- name: remove config and any ceph socket left
file:
path: "{{ item }}"
state: absent
@ -786,6 +786,7 @@
- /etc/ceph
- /etc/keepalived
- /etc/haproxy
- /run/ceph
- name: remove logs
file:

View File

@ -651,13 +651,15 @@
become: true
tasks:
- name: purge ceph directories for "{{ ansible_hostname }}"
- name: purge ceph directories for "{{ ansible_hostname }}" and ceph socket
file:
path: "{{ item }}"
state: absent
with_items:
- /etc/ceph
- /var/log/ceph
- /run/ceph
- "{{ ceph_osd_docker_run_script_path | default('/usr/share') }}/ceph-osd-run.sh"
- name: remove ceph data
shell: rm -rf /var/lib/ceph/*