mirror of https://github.com/ceph/ceph-ansible.git
33 lines
709 B
YAML
33 lines
709 B
YAML
|
---
|
||
|
# This playbook purges Ceph
|
||
|
# It removes: packages, configuration files and ALL THE DATA
|
||
|
|
||
|
- hosts:
|
||
|
- mons
|
||
|
- osds
|
||
|
|
||
|
vars:
|
||
|
devices: [ '/dev/sdb', '/dev/sdc', '/dev/sdd', '/dev/sde', '/dev/sdf' ]
|
||
|
partitions: [ '1', '2', '3' ]
|
||
|
|
||
|
tasks:
|
||
|
|
||
|
- name: Purge Ceph
|
||
|
command: ceph-deploy purge {{ ansible_fqdn }}
|
||
|
delegate_to: 127.0.0.1
|
||
|
|
||
|
- name: Remove OSD data
|
||
|
shell: rm -rf /var/lib/ceph/osd/*/*
|
||
|
ignore_errors: true
|
||
|
|
||
|
- name: Purge remaining data
|
||
|
command: ceph-deploy purgedata {{ ansible_fqdn }}
|
||
|
delegate_to: 127.0.0.1
|
||
|
|
||
|
- name: Purge partitions
|
||
|
shell: parted -s {{ item[0] }} rm {{ item[1] }}
|
||
|
with_nested:
|
||
|
- devices
|
||
|
- partitions
|
||
|
ignore_errors: true
|