Merge pull request #1435 from dlupescu/purge_cluster_nvme_fix

purge-cluster: fix grep match for NVMe and HP Smart Array devices
pull/1340/merge
Sébastien Han 2017-04-12 11:25:11 +02:00 committed by GitHub
commit bda744a5f4
1 changed files with 1 additions and 1 deletions

View File

@ -331,7 +331,7 @@
echo "Do not use your system disk!" echo "Do not use your system disk!"
exit 1 exit 1
fi fi
raw_device=$(echo "{{ item }}" | egrep -o '/dev/([hsv]d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p){1,2}') raw_device=$(echo "{{ item }}" | egrep -o '/dev/([hsv]d[a-z]{1,2}|cciss/c[0-9]d[0-9]|nvme[0-9]n[0-9]){1,2}')
partition_nb=$(echo "{{ item }}" | egrep -o '[0-9]{1,2}$') partition_nb=$(echo "{{ item }}" | egrep -o '[0-9]{1,2}$')
sgdisk --delete $partition_nb $raw_device sgdisk --delete $partition_nb $raw_device
with_items: "{{ ceph_journal_partition_to_erase_path.stdout_lines | default([]) }}" with_items: "{{ ceph_journal_partition_to_erase_path.stdout_lines | default([]) }}"