From 90d47f77a21d4032f272eb8c5a1769d3bb3c1e3b Mon Sep 17 00:00:00 2001 From: Ben England Date: Wed, 7 Oct 2015 11:40:10 -0400 Subject: [PATCH] fix regex for partition names, enhance for NVM --- roles/ceph-osd/tasks/check_devices.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/ceph-osd/tasks/check_devices.yml b/roles/ceph-osd/tasks/check_devices.yml index 4f5b60a52..50d454439 100644 --- a/roles/ceph-osd/tasks/check_devices.yml +++ b/roles/ceph-osd/tasks/check_devices.yml @@ -4,8 +4,9 @@ # 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/(([a-z]{3,4}[0-9]$)|(cciss/c[0-9]{1}d[0-9]{1}p[0-9]$))'" + 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 -- 2.39.5