]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-osd: fix the autodiscovery osd scenario 540/head
authorSébastien Han <seb@redhat.com>
Sat, 13 Feb 2016 22:07:44 +0000 (23:07 +0100)
committerSébastien Han <seb@redhat.com>
Sat, 13 Feb 2016 22:07:44 +0000 (23:07 +0100)
the parted command wasn't getting the devices properly and the partition
count is not necessary.

Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-osd/tasks/check_devices.yml

index 64d62c1a74222100803b74e4ea9261e612fadd41..8292ea3dff8bd10da2d11d21894722bd9243997c 100644 (file)
   when: not osd_auto_discovery
 
 - name: check if a partition named 'ceph' exists (autodiscover disks)
-  shell: "parted --script /dev/{{ item }} print | egrep -sq '^ 1.*ceph'"
+  shell: "parted --script /dev/{{ item.key }} print | egrep -sq '^ 1.*ceph'"
   with_dict: ansible_devices
   changed_when: false
   failed_when: false
   when:
     ansible_devices is defined and
     item.value.removable == "0" and
-    item.value.partitions|count != 0 and
     osd_auto_discovery
 
 # NOTE (leseb): we must do this because of