partition number should be at end of string for any device type

pull/412/head
Ben England 2015-10-07 12:50:42 -04:00
parent 90d47f77a2
commit 543e4cb244
1 changed files with 1 additions and 2 deletions

View File

@ -4,9 +4,8 @@
# 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}'"
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