mirror of https://github.com/ceph/ceph-ansible.git
purge-cluster: skip tasks that use ceph-volume if it's not installed
This will allow the playbook to be idempotent.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1656935
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit ffd56177e7
)
pull/3458/head
parent
e3f2f5e926
commit
e55ec6c0f5
|
@ -350,6 +350,11 @@
|
|||
failed_when: false
|
||||
register: ceph_lockbox_partition_to_erase_path
|
||||
|
||||
- name: see if ceph-volume is installed
|
||||
command: "command -v ceph-volume"
|
||||
failed_when: false
|
||||
register: ceph_volume_present
|
||||
|
||||
- name: zap and destroy osds created by ceph-volume with lvm_volumes
|
||||
ceph_volume:
|
||||
data: "{{ item.data }}"
|
||||
|
@ -366,6 +371,7 @@
|
|||
with_items: "{{ lvm_volumes }}"
|
||||
when:
|
||||
- osd_scenario == "lvm"
|
||||
- ceph_volume_present.rc == 0
|
||||
|
||||
- name: zap and destroy osds created by ceph-volume with devices
|
||||
ceph_volume:
|
||||
|
@ -376,6 +382,7 @@
|
|||
with_items: "{{ devices | default([]) }}"
|
||||
when:
|
||||
- osd_scenario == "lvm"
|
||||
- ceph_volume_present.rc == 0
|
||||
|
||||
- name: get ceph block partitions
|
||||
shell: |
|
||||
|
|
Loading…
Reference in New Issue