mirror of https://github.com/ceph/ceph-ansible.git
purge-cluster: add a check for a device list
People who use `osd_auto_discovery` feature will not have a devices variable populated, so we first check for the existence of devices. Signed-off-by: Sébastien Han <seb@redhat.com>pull/646/head
parent
14e957dfec
commit
d9fb812029
|
@ -59,6 +59,13 @@
|
|||
state: absent
|
||||
|
||||
tasks:
|
||||
- name: check for a device list
|
||||
fail:
|
||||
msg: "OSD automatic discovery was detected, purge cluster does not support this scenario. If you want to purge the cluster, manually provide the list of devices in group_vars/osds using the devices variable."
|
||||
when:
|
||||
devices is not defined and
|
||||
osd_auto_discovery
|
||||
|
||||
- name: get osd numbers
|
||||
shell: "if [ -d /var/lib/ceph/osd ] ; then ls /var/lib/ceph/osd | cut -d '-' -f 2 ; fi"
|
||||
register: osd_ids
|
||||
|
|
Loading…
Reference in New Issue