diff --git a/roles/edpm_extra_mounts/molecule/default/verify.yml b/roles/edpm_extra_mounts/molecule/default/verify.yml index 3d2620f45..1e4b3eb43 100644 --- a/roles/edpm_extra_mounts/molecule/default/verify.yml +++ b/roles/edpm_extra_mounts/molecule/default/verify.yml @@ -13,3 +13,15 @@ # common directories - "/dev/hugepages1G" - "/dev/hugepages2MB" + - name: Check if directories are mounted + shell: mount | grep "{{ item }}" + register: mount_check + ignore_errors: yes + with_items: + - "/dev/hugepages1G" + - "/dev/hugepages2MB" + - name: Fail if any directory is not mounted + fail: + msg: "Directory {{ item.item }} is not mounted" + when: item.rc != 0 + with_items: "{{ mount_check.results }}" diff --git a/roles/edpm_extra_mounts/tasks/extra_mounts.yml b/roles/edpm_extra_mounts/tasks/extra_mounts.yml index 67015dadf..840135946 100644 --- a/roles/edpm_extra_mounts/tasks/extra_mounts.yml +++ b/roles/edpm_extra_mounts/tasks/extra_mounts.yml @@ -34,6 +34,6 @@ fstype: "{{ item.fstype }}" opts: "{{ item.opts }}" state: mounted - loop: "{{ edpm_default_mounts | zip(edpm_extra_mounts) | list }}" + loop: "{{ edpm_default_mounts + edpm_extra_mounts }}" tags: - extra_mounts