From f756afce5db571c9bbd4ee5019c8ff4f83e97b8a Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Fri, 11 Jan 2019 15:19:14 +0000 Subject: [PATCH] Allow Kayobe to wipe NVMe disks Change-Id: I7dd817e43a86bad9fa88f1c56425d939a50bf22a Story: 2004758 Task: 28866 --- ansible/roles/wipe-disks/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/wipe-disks/tasks/main.yml b/ansible/roles/wipe-disks/tasks/main.yml index cad98fc7c..b44095f95 100644 --- a/ansible/roles/wipe-disks/tasks/main.yml +++ b/ansible/roles/wipe-disks/tasks/main.yml @@ -15,9 +15,9 @@ - name: Check for unmounted block devices shell: > lsblk -i -o NAME,MOUNTPOINT | awk \ - '/^ *[|`]-/ && NF > 1 { mounts[master_dev] = mounts[master_dev] $2 " " } - /^sd/ && NF == 1 { master_dev = $1; mounts[master_dev] = "" } - END { for (dev in mounts) if (mounts[dev] == "") print dev }' + '/^ *[|`]-/ && NF > 1 { mounts[master_dev] = mounts[master_dev] $2 " " } + /^(nvme|sd)/ && NF == 1 { master_dev = $1; mounts[master_dev] = "" } + END { for (dev in mounts) if (mounts[dev] == "") print dev }' register: unmounted_devices changed_when: False