From: Sébastien Han Date: Fri, 11 Apr 2014 14:34:33 +0000 (+0200) Subject: Add a purge playbook to remove Ceph X-Git-Tag: v1.0.0~362^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=be7f8ab89b8eb0f814bdda6c7a27fd8660157dcc;p=ceph-ansible.git Add a purge playbook to remove Ceph The playbook removes packages, configuration files and ALL THE DATA from Ceph. Signed-off-by: Sébastien Han --- diff --git a/purge.yml b/purge.yml new file mode 100644 index 000000000..218c9ceb5 --- /dev/null +++ b/purge.yml @@ -0,0 +1,30 @@ +--- +# This playbook purges Ceph +# It removes: packages, configuration files and ALL THE DATA + +--- + +- hosts: + - mons + - osds + + tasks: + + - name: Purge Ceph + command: ceph-deploy purge {{ ansible_hostname }} + 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_hostname }} + delegate_to: 127.0.0.1 + + - name: Purge partitions + shell: parted -s {{ item[0] }} rm {{ item[1] }} + with_nested: + - devices + - ['1', '2'] + ignore_errors: true