]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
fix regex syntax for alternative device types 412/head
authorBen England <bengland@redhat.com>
Fri, 9 Oct 2015 10:40:57 +0000 (06:40 -0400)
committerBen England <bengland@redhat.com>
Fri, 9 Oct 2015 10:40:57 +0000 (06:40 -0400)
roles/ceph-osd/tasks/check_devices.yml

index 309b7b5a506eb038f2ab14374aac9b1bbd96a678..447a6de0cee5b2f82f304c2b452b835112aba97f 100644 (file)
@@ -4,8 +4,14 @@
 # it should exist we rc=0 and don't do anything unless we do something like --force
 # As as a final word, I prefer to keep the partition check instead of running ceph-disk prepare with "failed_when: false"
 # I believe it's safer
-- name: check if the device is a partition or a disk
-  shell: "echo '{{ item }}' | egrep '/dev/[sd[a-z]{1,2}|hd[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p][0-9]{1,2}$'"
+#
+# regex syntax uses (pat1|pat2|...|patN) for different families of device
+# names, but has a common expression for partition number at the end.
+# allow 2-digit partition numbers so fast SSDs can be shared by > 9 disks
+# for SSD journals.
+
+- name: check if the device is a partition
+  shell: "echo '{{ item }}' | egrep '/dev/(sd[a-z]{1,2}|hd[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