diff --git a/tests/tests_create_lvmvdo_then_remove.yml b/tests/tests_create_lvmvdo_then_remove.yml index 06d3662b..5211e568 100644 --- a/tests/tests_create_lvmvdo_then_remove.yml +++ b/tests/tests_create_lvmvdo_then_remove.yml @@ -40,10 +40,20 @@ ansible_facts.packages[blivet_pkg_name[0]][0]['version'] + '-' + ansible_facts.packages[blivet_pkg_name[0]][0]['release'] }}" - - name: Check if kvdo is loadable - shell: | - set -euo pipefail - modprobe --dry-run kvdo + - name: Check if kvdo is loadable (RHEL 8 and 9) + when: + - ansible_facts["os_family"] == "RedHat" + - ansible_facts["distribution_major_version"] | int < 10 + command: modprobe --dry-run kvdo + ignore_errors: true # noqa ignore-errors + changed_when: false + register: __storage_kvdo_loadable + + - name: Check if dm-vdo is loadable (RHEL 10 and Fedora) + when: (ansible_facts["os_family"] == "RedHat" and + ansible_facts["distribution_major_version"] | int == 10) or + ansible_facts["os_family"] == "Fedora" + command: modprobe --dry-run dm-vdo ignore_errors: true # noqa ignore-errors changed_when: false register: __storage_kvdo_loadable @@ -51,7 +61,6 @@ - name: Run tests if VDO is available when: - blivet_pkg_version is version("3.2.2-10", ">=") - - ansible_facts["distribution"] != "Fedora" - __storage_kvdo_loadable is success block: - name: Get unused disks