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/5788/head
Guillaume Abrioux 2020-09-11 17:30:33 +02:00 committed by Dimitri Savineau
parent 4b55dcdc0d
commit edcdbe5601
2 changed files with 5 additions and 2 deletions

View File

@ -781,7 +781,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
@ -789,6 +789,7 @@
- /etc/ceph
- /etc/keepalived
- /etc/haproxy
- /run/ceph
- name: remove logs
file:

View File

@ -656,13 +656,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/*