mirror of https://github.com/ceph/ceph-ansible.git
commit
c691638c3e
|
@ -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
|
||||
|
@ -132,14 +139,15 @@
|
|||
|
||||
# Ubuntu 14.04
|
||||
- name: stop ceph osds on ubuntu
|
||||
command: stop ceph-osd-all
|
||||
command: stop ceph-osd id={{ item }}
|
||||
failed_when: false
|
||||
when:
|
||||
ansible_distribution == 'Ubuntu' and
|
||||
osd_group_name in group_names
|
||||
with_items: "{{ osd_ids.stdout_lines }}"
|
||||
|
||||
- name: stop ceph mons on ubuntu
|
||||
command: stop ceph-mon-all
|
||||
command: stop ceph-mon id={{ ansible_hostname }}
|
||||
failed_when: false
|
||||
when:
|
||||
ansible_distribution == 'Ubuntu' and
|
||||
|
@ -181,6 +189,12 @@
|
|||
when:
|
||||
osd_group_name in group_names
|
||||
|
||||
- name: remove monitor store and bootstrap keys
|
||||
shell: rm -rf /var/lib/ceph/
|
||||
failed_when: false
|
||||
when:
|
||||
mon_group_name in group_names
|
||||
|
||||
- name: is reboot needed
|
||||
local_action: shell echo requesting reboot
|
||||
notify:
|
||||
|
|
Loading…
Reference in New Issue