]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-osd: fix regex to check partitions 639/head
authorSébastien Han <seb@redhat.com>
Mon, 21 Mar 2016 15:27:02 +0000 (16:27 +0100)
committerSébastien Han <seb@redhat.com>
Mon, 21 Mar 2016 15:27:02 +0000 (16:27 +0100)
Thanks @dvusboy

closes: #636

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

index 8292ea3dff8bd10da2d11d21894722bd9243997c..bd735ca4208db554eb7fc7dada1b6a17ef455c1b 100644 (file)
@@ -11,7 +11,7 @@
 # for SSD journals.
 
 - name: check if the device is a partition
-  shell: "echo '{{ item }}' | egrep '/dev/({h,s,v}d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p)[0-9]{1,2}$'"
+  shell: "echo '{{ item }}' | egrep '/dev/([hsv]d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p)[0-9]{1,2}$'"
   with_items: devices
   changed_when: false
   failed_when: false
@@ -19,7 +19,7 @@
   when: not osd_auto_discovery
 
 - name: check if the device is a partition (autodiscover disks)
-  shell: "echo '/dev/{{ item.key }}' | egrep '/dev/({h,s,v}d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p)[0-9]{1,2}$'"
+  shell: "echo '/dev/{{ item.key }}' | egrep '/dev/([hsv]d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p)[0-9]{1,2}$'"
   with_dict: ansible_devices
   changed_when: false
   failed_when: false