purge-cluster: zap devices used with the lvm scenario

Fixes: https://github.com/ceph/ceph-ansible/issues/3156

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
pull/3150/head
Andrew Schoen 2018-09-21 14:46:30 -05:00 committed by Sébastien Han
parent 5da71e1ca1
commit 9747f3dbd5
1 changed files with 11 additions and 1 deletions

View File

@ -350,7 +350,7 @@
failed_when: false failed_when: false
register: ceph_lockbox_partition_to_erase_path register: ceph_lockbox_partition_to_erase_path
- name: zap and destroy OSDs created by ceph-volume - name: zap and destroy osds created by ceph-volume with lvm_volumes
ceph_volume: ceph_volume:
data: "{{ item.data }}" data: "{{ item.data }}"
data_vg: "{{ item.data_vg|default(omit) }}" data_vg: "{{ item.data_vg|default(omit) }}"
@ -367,6 +367,16 @@
when: when:
- osd_scenario == "lvm" - osd_scenario == "lvm"
- name: zap and destroy osds created by ceph-volume with devices
ceph_volume:
data: "{{ item }}"
action: "zap"
environment:
CEPH_VOLUME_DEBUG: 1
with_items: "{{ devices | default([]) }}"
when:
- osd_scenario == "lvm"
- name: get ceph block partitions - name: get ceph block partitions
shell: | shell: |
blkid -o device -t PARTLABEL="ceph block" blkid -o device -t PARTLABEL="ceph block"