]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Various small fixes: local_action required root, ansible2 warnings, using file module... 926/head
authorJames Saint-Rossy <james_saintrossy@cable.comcast.com>
Wed, 10 Aug 2016 02:53:07 +0000 (22:53 -0400)
committerJames Saint-Rossy <james_saintrossy@cable.comcast.com>
Wed, 10 Aug 2016 02:53:07 +0000 (22:53 -0400)
purge-cluster.yml

index b2c8c9473d14b8cd604aac9f676f453c08acc750..ab2b8ec13d077f529beaa27ef4e1448cfc997937 100644 (file)
      osd_group_name in group_names
 
   - name: remove osd mountpoint tree
-    shell: rm -rf /var/lib/ceph/osd
+    file:
+      path: /var/lib/ceph/osd/
+      state: absent
     register: remove_osd_mountpoints
-    failed_when: false
+    ignore_errors: true
     when:
       osd_group_name in group_names
 
   - name: remove monitor store and bootstrap keys
-    shell: rm -rf /var/lib/ceph/
-    failed_when: false
+    file:
+      path: /var/lib/ceph/
+      state: absent
     when:
       mon_group_name in group_names
 
       - remove data
     when:
       osd_group_name in group_names and
-      remove_osd_mountpoints.rc != 0
+      remove_osd_mountpoints.failed is defined
 
   - name: see if ceph-disk is installed
     shell: "which ceph-disk"
 
   - name: zap osd disks
     shell: ceph-disk zap "{{ item }}"
-    with_items: devices
+    with_items: "{{ devices | default([]) }}"
     when:
      osd_group_name in group_names and
      ceph_disk_present.rc == 0 and
 
   - name: request data removal
     local_action: shell echo requesting data removal
+    become: false
     notify:
       - remove data