ceph-osd: simply the regex to check the device

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/536/head
Sébastien Han 2016-02-11 22:51:23 +01:00
parent ea0979cbbe
commit b285a5ae8f
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@
# for SSD journals. # for SSD journals.
- name: check if the device is a partition - 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}$'" 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}$'"
with_items: devices with_items: devices
changed_when: false changed_when: false
failed_when: false failed_when: false
@ -19,7 +19,7 @@
when: not osd_auto_discovery when: not osd_auto_discovery
- name: check if the device is a partition (autodiscover disks) - name: check if the device is a partition (autodiscover disks)
shell: "echo '/dev/{{ item.key }}' | 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}$'" 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}$'"
with_dict: ansible_devices with_dict: ansible_devices
changed_when: false changed_when: false
failed_when: false failed_when: false