]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Do not zap disks on monitors 423/head
authorSébastien Han <seb@redhat.com>
Tue, 20 Oct 2015 22:32:42 +0000 (00:32 +0200)
committerSébastien Han <seb@redhat.com>
Tue, 20 Oct 2015 22:32:42 +0000 (00:32 +0200)
We don't necessary want to wipe and delete partition of the disks on the
monitor nodes, so we simply perform the operation on the OSD nodes.

Signed-off-by: Sébastien Han <seb@redhat.com>
purge-cluster.yml

index 62726e104fec8dec11b9c8714f7ae73de249c90c..417ca3ea9937de3edfaef2b80f514c8bdf769fe2 100644 (file)
@@ -6,6 +6,23 @@
   - mons
   - osds
 
+  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/*/*
+    failed_when: false
+
+  - name: purge remaining data
+    command: ceph-deploy purgedata {{ ansible_fqdn }}
+    delegate_to: 127.0.0.1
+
+- hosts:
+  - osds
+
   vars:
     devices: [ '/dev/sdb', '/dev/sdc', '/dev/sdd', '/dev/sde', '/dev/sdf' ]
     partitions: [ '1', '2', '3' ]
     with_items: devices
     failed_when: false
 
-  - name: disk zap
+  - name: disk zap again
     command: /usr/sbin/sgdisk --zap-all --clear --mbrtogpt -g -- {{ item }}
     with_items: devices
     failed_when: false
 
-  - 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/*/*
-    failed_when: false
-
-  - name: purge remaining data
-    command: ceph-deploy purgedata {{ ansible_fqdn }}
-    delegate_to: 127.0.0.1
-
   - name: call partprobe
     command: partprobe