]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
testnode: Filter ansible_mounts with regex 671/head
authorZack Cerza <zack@redhat.com>
Wed, 9 Mar 2022 02:50:57 +0000 (19:50 -0700)
committerZack Cerza <zack@redhat.com>
Thu, 10 Mar 2022 17:51:20 +0000 (10:51 -0700)
This catches cases where e.g. /var is on the root volume but /var/log is
not.

Signed-off-by: Zack Cerza <zack@redhat.com>
roles/testnode/tasks/zap_disks.yml

index a5a6d346c72984deb606258596e41d55199a1edf..06f9eab315eebd27c426a79ddd98f96612a877a1 100644 (file)
   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