Allow Kayobe to wipe NVMe disks

Change-Id: I7dd817e43a86bad9fa88f1c56425d939a50bf22a
Story: 2004758
Task: 28866
This commit is contained in:
Pierre Riteau 2019-01-11 15:19:14 +00:00
parent bf3d31aaa2
commit f756afce5d

View File

@ -16,7 +16,7 @@
shell: > shell: >
lsblk -i -o NAME,MOUNTPOINT | awk \ lsblk -i -o NAME,MOUNTPOINT | awk \
'/^ *[|`]-/ && NF > 1 { mounts[master_dev] = mounts[master_dev] $2 " " } '/^ *[|`]-/ && NF > 1 { mounts[master_dev] = mounts[master_dev] $2 " " }
/^sd/ && NF == 1 { master_dev = $1; mounts[master_dev] = "" } /^(nvme|sd)/ && NF == 1 { master_dev = $1; mounts[master_dev] = "" }
END { for (dev in mounts) if (mounts[dev] == "") print dev }' END { for (dev in mounts) if (mounts[dev] == "") print dev }'
register: unmounted_devices register: unmounted_devices
changed_when: False changed_when: False