From 6f467f9378ae8c130c7bede0e69e3c0c1ec08a8d Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 8 Mar 2022 19:50:57 -0700 Subject: [PATCH] testnode: Filter ansible_mounts with regex This catches cases where e.g. /var is on the root volume but /var/log is not. Signed-off-by: Zack Cerza --- roles/testnode/tasks/zap_disks.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/roles/testnode/tasks/zap_disks.yml b/roles/testnode/tasks/zap_disks.yml index a5a6d34..06f9eab 100644 --- a/roles/testnode/tasks/zap_disks.yml +++ b/roles/testnode/tasks/zap_disks.yml @@ -32,15 +32,7 @@ with_items: "{{ ansible_mounts }}" when: - item.mount != '/' and - item.mount != '/var' and - item.mount != '/tmp' and - item.mount != '/root' and - item.mount != '/home' and - '"/boot" not in item.mount' and - item.mount != '/.snapshots' and - item.mount != '/usr/local' and - item.mount != '/srv' and - item.mount != '/opt' + not item is match("/(boot|home|opt|root|srv|tmp|usr/local|var|.snapshots") ## http://tracker.ceph.com/issues/20533 ## Trusty version of wipefs lacks --force option -- 2.39.5