Merge pull request #981 from ceph/persistent-disk-path

ceph-osd: get full link path when testing if a partition
pull/989/head
Leseb 2016-09-21 14:56:50 +02:00 committed by GitHub
commit e5acff23eb
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
---
- name: check if the device is a partition (autodiscover disks)
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}$'"
shell: "readlink -f /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

View File

@ -1,6 +1,6 @@
---
- name: check if the device is a partition
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}$'"
shell: "readlink -f {{ 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