From: Andrew Schoen Date: Tue, 11 Dec 2018 16:52:26 +0000 (-0600) Subject: purge-cluster: skip tasks that use ceph-volume if it's not installed X-Git-Tag: v4.0.0beta1~101 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ffd56177e7616ba6345f1f1cc1f3b3e6ea7d66f3;p=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 --- diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index 346a22e80..2e918e3ee 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -303,6 +303,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 }}" @@ -319,6 +324,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: @@ -329,6 +335,7 @@ with_items: "{{ devices | default([]) }}" when: - osd_scenario == "lvm" + - ceph_volume_present.rc == 0 - name: get ceph block partitions shell: |