diff --git a/tests/ensure_provider_tests.py b/tests/ensure_provider_tests.py index b779be2..d56d347 100755 --- a/tests/ensure_provider_tests.py +++ b/tests/ensure_provider_tests.py @@ -11,7 +11,11 @@ import sys GET_NM_VERSION = """ - - block: + - when: + - ansible_distribution_major_version != '6' + tags: + - always + block: - name: Install NetworkManager package: name: NetworkManager @@ -20,10 +24,6 @@ GET_NM_VERSION = """ command: rpm -q --qf "%{version}" NetworkManager register: networkmanager_version when: true - when: - - ansible_distribution_major_version != '6' - tags: - - always """ MINIMUM_NM_VERSION_CHECK = """ diff --git a/tests/playbooks/manual_test_ethtool_coalesce.yml b/tests/playbooks/manual_test_ethtool_coalesce.yml index 39b2e2b..e4c26d0 100644 --- a/tests/playbooks/manual_test_ethtool_coalesce.yml +++ b/tests/playbooks/manual_test_ethtool_coalesce.yml @@ -102,7 +102,9 @@ when: network_provider == 'nm' always: - - block: + - tags: + - "tests::cleanup" + block: - import_role: name: linux-system-roles.network vars: @@ -114,5 +116,3 @@ - include_tasks: tasks/manage_test_interface.yml vars: state: absent - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_802_1x.yml b/tests/playbooks/tests_802_1x.yml index aecc688..5565e5b 100644 --- a/tests/playbooks/tests_802_1x.yml +++ b/tests/playbooks/tests_802_1x.yml @@ -93,7 +93,9 @@ - include_tasks: tasks/test_802.1x_capath.yml always: - - block: + - tags: + - "tests::cleanup" + block: - import_role: name: linux-system-roles.network vars: @@ -124,5 +126,3 @@ - /etc/pki/ca-trust/source/anchors/cacert.pem - name: Update ca trust command: update-ca-trust - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_bond.yml b/tests/playbooks/tests_bond.yml index 3dd42a4..fd3af90 100644 --- a/tests/playbooks/tests_bond.yml +++ b/tests/playbooks/tests_bond.yml @@ -66,25 +66,27 @@ - "{{ controller_profile }}" - "{{ port1_profile }}" - "{{ port2_profile }}" - - command: grep 'Polling Interval' + - name: "** TEST check polling interval" + command: grep 'Polling Interval' /proc/net/bonding/{{ controller_device }} - name: "** TEST check polling interval" register: result until: "'110' in result.stdout" - - command: ip -4 a s {{ controller_device }} - name: "** TEST check IPv4" + - name: "** TEST check IPv4" + command: ip -4 a s {{ controller_device }} register: result until: "'192.0.2' in result.stdout" retries: 20 delay: 2 - - command: ip -6 a s {{ controller_device }} - name: "** TEST check IPv6" + - name: "** TEST check IPv6" + command: ip -6 a s {{ controller_device }} register: result until: "'2001' in result.stdout" retries: 20 delay: 2 always: - - block: + - tags: + - "tests::cleanup" + block: - name: Import network role import_role: name: linux-system-roles.network @@ -107,5 +109,3 @@ command: mv -vf /etc/resolv.conf.bak /etc/resolv.conf when: - network_provider == "initscripts" - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_bond_cloned_mac.yml b/tests/playbooks/tests_bond_cloned_mac.yml index 123cced..4d7f0dd 100644 --- a/tests/playbooks/tests_bond_cloned_mac.yml +++ b/tests/playbooks/tests_bond_cloned_mac.yml @@ -103,7 +103,9 @@ when: network_provider == 'initscripts' always: - - block: + - tags: + - "tests::cleanup" + block: - name: Import network role import_role: name: linux-system-roles.network @@ -126,5 +128,3 @@ command: mv -vf /etc/resolv.conf.bak /etc/resolv.conf when: - network_provider == "initscripts" - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_bond_deprecated.yml b/tests/playbooks/tests_bond_deprecated.yml index d5b6a8d..a3006ef 100644 --- a/tests/playbooks/tests_bond_deprecated.yml +++ b/tests/playbooks/tests_bond_deprecated.yml @@ -62,25 +62,27 @@ - "{{ controller_profile }}" - "{{ port1_profile }}" - "{{ port2_profile }}" - - command: grep 'Polling Interval' + - name: "** TEST check polling interval" + command: grep 'Polling Interval' /proc/net/bonding/{{ controller_device }} - name: "** TEST check polling interval" register: result until: "'110' in result.stdout" - - command: ip -4 a s {{ controller_device }} - name: "** TEST check IPv4" + - name: "** TEST check IPv4" + command: ip -4 a s {{ controller_device }} register: result until: "'192.0.2' in result.stdout" retries: 20 delay: 2 - - command: ip -6 a s {{ controller_device }} - name: "** TEST check IPv6" + - name: "** TEST check IPv6" + command: ip -6 a s {{ controller_device }} register: result until: "'2001' in result.stdout" retries: 20 delay: 2 always: - - block: + - tags: + - "tests::cleanup" + block: - name: Import network role import_role: name: linux-system-roles.network @@ -99,5 +101,3 @@ - command: ip link del {{ controller_device }} ignore_errors: true - import_tasks: tasks/remove_test_interfaces_with_dhcp.yml - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_bond_options.yml b/tests/playbooks/tests_bond_options.yml index 0e3695a..decfbbc 100644 --- a/tests/playbooks/tests_bond_options.yml +++ b/tests/playbooks/tests_bond_options.yml @@ -79,9 +79,9 @@ - "{{ port1_profile }}" - "{{ port2_profile }}" - - command: cat + - name: "** TEST check bond settings" + command: cat /sys/class/net/{{ controller_device }}/bonding/'{{ item.key }}' - name: "** TEST check bond settings" register: result until: "'{{ item.value }}' in result.stdout" loop: @@ -102,14 +102,14 @@ - { key: 'use_carrier', value: '1'} - { key: 'xmit_hash_policy', value: 'encap2+3'} - - command: ip -4 a s {{ controller_device }} - name: "** TEST check IPv4" + - name: "** TEST check IPv4" + command: ip -4 a s {{ controller_device }} register: result until: "'192.0.2' in result.stdout" retries: 20 delay: 2 - - command: ip -6 a s {{ controller_device }} - name: "** TEST check IPv6" + - name: "** TEST check IPv6" + command: ip -6 a s {{ controller_device }} register: result until: "'2001' in result.stdout" retries: 20 @@ -145,9 +145,9 @@ type: ethernet interface_name: "{{ dhcp_interface2 }}" controller: "{{ controller_profile }}" - - command: cat + - name: "** TEST check bond settings" + command: cat /sys/class/net/{{ controller_device }}/bonding/'{{ item.key }}' - name: "** TEST check bond settings" register: result until: "'{{ item.value }}' in result.stdout" loop: @@ -157,21 +157,23 @@ - { key: 'arp_validate', value: 'none'} - { key: 'primary', value: '{{ dhcp_interface1 }}'} - - command: ip -4 a s {{ controller_device }} - name: "** TEST check IPv4" + - name: "** TEST check IPv4" + command: ip -4 a s {{ controller_device }} register: result until: "'192.0.2' in result.stdout" retries: 20 delay: 2 - - command: ip -6 a s {{ controller_device }} - name: "** TEST check IPv6" + - name: "** TEST check IPv6" + command: ip -6 a s {{ controller_device }} register: result until: "'2001' in result.stdout" retries: 20 delay: 2 always: - - block: + - tags: + - "tests::cleanup" + block: - name: Import network role import_role: name: linux-system-roles.network @@ -190,5 +192,3 @@ - command: ip link del {{ controller_device }} ignore_errors: true - import_tasks: tasks/remove_test_interfaces_with_dhcp.yml - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_bond_removal.yml b/tests/playbooks/tests_bond_removal.yml index 82c6f50..45114bf 100644 --- a/tests/playbooks/tests_bond_removal.yml +++ b/tests/playbooks/tests_bond_removal.yml @@ -66,19 +66,19 @@ - "{{ controller_profile }}" - "{{ port1_profile }}" - "{{ port2_profile }}" - - command: grep 'Polling Interval' + - name: "** TEST check polling interval" + command: grep 'Polling Interval' /proc/net/bonding/{{ controller_device }} - name: "** TEST check polling interval" register: result until: "'110' in result.stdout" - - command: ip -4 a s {{ controller_device }} - name: "** TEST check IPv4" + - name: "** TEST check IPv4" + command: ip -4 a s {{ controller_device }} register: result until: "'192.0.2' in result.stdout" retries: 20 delay: 2 - - command: ip -6 a s {{ controller_device }} - name: "** TEST check IPv6" + - name: "** TEST check IPv6" + command: ip -6 a s {{ controller_device }} register: result until: "'2001' in result.stdout" retries: 20 @@ -224,7 +224,9 @@ when: network_provider == "initscripts" always: - - block: + - tags: + - "tests::cleanup" + block: - name: Import network role import_role: name: linux-system-roles.network @@ -241,5 +243,3 @@ command: mv -vf /etc/resolv.conf.bak /etc/resolv.conf when: - network_provider == "initscripts" - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_checkpoint_cleanup.yml b/tests/playbooks/tests_checkpoint_cleanup.yml index 3432a89..7673ea6 100644 --- a/tests/playbooks/tests_checkpoint_cleanup.yml +++ b/tests/playbooks/tests_checkpoint_cleanup.yml @@ -72,7 +72,10 @@ '/org/freedesktop/NetworkManager/Checkpoint/' not in nm_dbus_objects.stdout_lines always: - - block: + - tags: + - "tests::cleanup" + ignore_errors: true + block: # Use internal module directly for speedup - network_connections: provider: nm @@ -84,6 +87,3 @@ dest: "/etc/sysconfig/network-scripts/ifcfg-{{ interface }}" state: absent - command: ip link del "{{ interface }}" - ignore_errors: true - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_dummy.yml b/tests/playbooks/tests_dummy.yml index 3b97844..bbe883a 100644 --- a/tests/playbooks/tests_dummy.yml +++ b/tests/playbooks/tests_dummy.yml @@ -13,7 +13,9 @@ tags: - always - - block: + - tags: + - tests::dummy:create + block: - include_tasks: tasks/run_test.yml vars: lsr_description: Create a dummy interface @@ -27,5 +29,3 @@ - tasks/assert_device_present.yml lsr_cleanup: - tasks/cleanup_profile+device.yml - tags: - - tests::dummy:create diff --git a/tests/playbooks/tests_eth_pci_address_match.yml b/tests/playbooks/tests_eth_pci_address_match.yml index b81caa8..afa749f 100644 --- a/tests/playbooks/tests_eth_pci_address_match.yml +++ b/tests/playbooks/tests_eth_pci_address_match.yml @@ -64,7 +64,9 @@ - "'pci-0001:00:00.0' not in clear_path.stdout" msg: "The PCI address is not removed" always: - - block: + - tags: + - "tests::cleanup" + block: - name: Import network role import_role: name: linux-system-roles.network @@ -74,5 +76,3 @@ persistent_state: absent state: down ignore_errors: true - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_ethtool_coalesce.yml b/tests/playbooks/tests_ethtool_coalesce.yml index 0fe3b60..eb49236 100644 --- a/tests/playbooks/tests_ethtool_coalesce.yml +++ b/tests/playbooks/tests_ethtool_coalesce.yml @@ -145,7 +145,9 @@ - network_provider == "initscripts" always: - - block: + - tags: + - "tests::cleanup" + block: - name: Import network role import_role: name: linux-system-roles.network @@ -157,5 +159,3 @@ - include_tasks: tasks/manage_test_interface.yml vars: state: absent - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_ethtool_features.yml b/tests/playbooks/tests_ethtool_features.yml index 3d419b4..ee67ca3 100644 --- a/tests/playbooks/tests_ethtool_features.yml +++ b/tests/playbooks/tests_ethtool_features.yml @@ -191,7 +191,9 @@ when: network_provider == 'nm' always: - - block: + - tags: + - "tests::cleanup" + block: - name: Import network role import_role: name: linux-system-roles.network @@ -204,5 +206,3 @@ - include_tasks: tasks/manage_test_interface.yml vars: state: absent - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_ethtool_ring.yml b/tests/playbooks/tests_ethtool_ring.yml index 665243f..8eaf933 100644 --- a/tests/playbooks/tests_ethtool_ring.yml +++ b/tests/playbooks/tests_ethtool_ring.yml @@ -183,7 +183,9 @@ - network_provider == "initscripts" always: - - block: + - tags: + - "tests::cleanup" + block: - name: Import network role import_role: name: linux-system-roles.network @@ -195,5 +197,3 @@ - include_tasks: tasks/manage_test_interface.yml vars: state: absent - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_infiniband.yml b/tests/playbooks/tests_infiniband.yml index a81fd70..f5fa064 100644 --- a/tests/playbooks/tests_infiniband.yml +++ b/tests/playbooks/tests_infiniband.yml @@ -1,6 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause --- - hosts: all + tags: + - "tests::infiniband" tasks: - block: - name: TEST Configuring infiniband devices @@ -45,22 +47,24 @@ msg: the settings in the virtual device ib0.000a match the specified settings - - command: ip -4 a s ib0.000a - name: "** TEST check IPv4" + - name: "** TEST check IPv4" + command: ip -4 a s ib0.000a register: result until: "'198.51.100.133/30' in result.stdout" retries: 20 delay: 2 - - command: ip -6 a s ib0.000a - name: "** TEST check IPv6" + - name: "** TEST check IPv6" + command: ip -6 a s ib0.000a register: result until: "'2001:db8::2/32' in result.stdout" retries: 20 delay: 2 always: - - block: + - tags: + - "tests::cleanup" + block: - name: Import network role import_role: name: linux-system-roles.network @@ -75,7 +79,3 @@ ignore_errors: true - command: ip link del ib0.000a ignore_errors: true - tags: - - "tests::cleanup" - tags: - - "tests::infiniband" diff --git a/tests/playbooks/tests_ipv6_dns_search.yml b/tests/playbooks/tests_ipv6_dns_search.yml index faa6c13..c94396a 100644 --- a/tests/playbooks/tests_ipv6_dns_search.yml +++ b/tests/playbooks/tests_ipv6_dns_search.yml @@ -146,7 +146,9 @@ when: ansible_distribution_major_version | int > 7 always: - - block: + - tags: + - "tests::cleanup" + block: - import_role: name: linux-system-roles.network vars: @@ -155,5 +157,3 @@ persistent_state: absent state: down ignore_errors: true - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_network_state.yml b/tests/playbooks/tests_network_state.yml index 8472d86..aeeed86 100644 --- a/tests/playbooks/tests_network_state.yml +++ b/tests/playbooks/tests_network_state.yml @@ -199,8 +199,8 @@ msg: the file `/etc/resolv.conf` contains the specified DNS configuration - - command: resolvectl - name: "** TEST check resolvectl" + - name: "** TEST check resolvectl" + command: resolvectl register: result until: "'example.com' in result.stdout" retries: 20 diff --git a/tests/playbooks/tests_provider.yml b/tests/playbooks/tests_provider.yml index c804f87..22b1c00 100644 --- a/tests/playbooks/tests_provider.yml +++ b/tests/playbooks/tests_provider.yml @@ -14,7 +14,9 @@ - always - - block: + - tags: + - tests::provider:initscripts_to_nm + block: - include_tasks: tasks/run_test.yml vars: state: present @@ -32,5 +34,3 @@ - tasks/assert_profile_present.yml lsr_cleanup: - tasks/cleanup_profile+device.yml - tags: - - tests::provider:initscripts_to_nm diff --git a/tests/playbooks/tests_reapply.yml b/tests/playbooks/tests_reapply.yml index 949e003..964a388 100644 --- a/tests/playbooks/tests_reapply.yml +++ b/tests/playbooks/tests_reapply.yml @@ -57,7 +57,10 @@ fail_msg: Reapply not found in log output that: "{{ 'connection reapplied' in test_module_run.stderr }}" always: - - block: + - tags: + - "tests::cleanup" + ignore_errors: true + block: # Use internal module directly for speedup - network_connections: provider: nm @@ -66,6 +69,3 @@ persistent_state: absent state: down - command: ip link del "{{ interface }}" - ignore_errors: true - tags: - - "tests::cleanup" diff --git a/tests/playbooks/tests_route_device.yml b/tests/playbooks/tests_route_device.yml index bf5eeec..53fabb3 100644 --- a/tests/playbooks/tests_route_device.yml +++ b/tests/playbooks/tests_route_device.yml @@ -153,6 +153,8 @@ when: network_provider == "nm" always: - name: Remove test configuration + tags: + - "tests::cleanup" block: - name: Bring down test devices and profiles include_role: @@ -183,6 +185,4 @@ loop: - "{{ interface0 }}" - "{{ interface1 }}" - tags: - - "tests::cleanup" ... diff --git a/tests/playbooks/tests_states.yml b/tests/playbooks/tests_states.yml index 76759e8..9e99243 100644 --- a/tests/playbooks/tests_states.yml +++ b/tests/playbooks/tests_states.yml @@ -14,7 +14,9 @@ - always - - block: + - tags: + - tests::states:create + block: - include_tasks: tasks/run_test.yml vars: lsr_description: I can create a profile @@ -32,10 +34,10 @@ when: "{{ network_provider == 'nm' }}" lsr_cleanup: - tasks/cleanup_profile+device.yml - tags: - - tests::states:create - - block: + - tags: + - tests::states:create_without_autoconnect + block: - include_tasks: tasks/run_test.yml vars: lsr_description: I can create a profile without autoconnect @@ -50,10 +52,10 @@ - tasks/assert_profile_present.yml lsr_cleanup: - tasks/cleanup_profile+device.yml - tags: - - tests::states:create_without_autoconnect - - block: + - tags: + - tests::states:activate + block: - include_tasks: tasks/run_test.yml vars: lsr_description: I can activate an existing profile @@ -66,10 +68,10 @@ - tasks/assert_profile_present.yml lsr_cleanup: - tasks/cleanup_profile+device.yml - tags: - - tests::states:activate - - block: + - tags: + - tests::states:remove_up + block: - include_tasks: tasks/run_test.yml vars: lsr_description: I can remove an existing profile without taking it @@ -84,10 +86,10 @@ - tasks/assert_profile_absent.yml lsr_cleanup: - tasks/cleanup_profile+device.yml - tags: - - tests::states:remove_up - - block: + - tags: + - tests::states:remove_down + block: - include_tasks: tasks/run_test.yml vars: lsr_description: I can take a profile down that is absent @@ -104,10 +106,10 @@ when: "{{ network_provider == 'nm' }}" lsr_cleanup: - tasks/cleanup_profile+device.yml - tags: - - tests::states:remove_down - - block: + - tags: + - tests::states:remove_down_twice + block: - include_tasks: tasks/run_test.yml vars: lsr_description: I will not get an error when I try to @@ -129,5 +131,3 @@ when: "{{ network_provider == 'nm' }}" lsr_cleanup: - tasks/cleanup_profile+device.yml - tags: - - tests::states:remove_down_twice diff --git a/tests/playbooks/tests_team.yml b/tests/playbooks/tests_team.yml index a12fff2..38042d4 100644 --- a/tests/playbooks/tests_team.yml +++ b/tests/playbooks/tests_team.yml @@ -13,7 +13,9 @@ tags: - always - - block: + - tags: + - tests::team:create + block: - include_tasks: tasks/run_test.yml vars: lsr_description: Create a team interface without any port attached @@ -27,5 +29,3 @@ - tasks/assert_device_present.yml lsr_cleanup: - tasks/cleanup_profile+device.yml - tags: - - tests::team:create diff --git a/tests/playbooks/tests_wireless.yml b/tests/playbooks/tests_wireless.yml index 22d0b0c..e33523d 100644 --- a/tests/playbooks/tests_wireless.yml +++ b/tests/playbooks/tests_wireless.yml @@ -77,7 +77,9 @@ client_cert: /etc/pki/tls/client.pem ca_cert: /etc/pki/tls/cacert.pem always: - - block: + - tags: + - "tests::cleanup" + block: - name: Import network role import_role: name: linux-system-roles.network @@ -88,5 +90,3 @@ state: down ignore_errors: true - include_tasks: tasks/cleanup_mock_wifi.yml - tags: - - "tests::cleanup" diff --git a/tests/tasks/enable_epel.yml b/tests/tasks/enable_epel.yml index 5cd3933..2bf7638 100644 --- a/tests/tasks/enable_epel.yml +++ b/tests/tasks/enable_epel.yml @@ -1,6 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause --- -- block: +- when: + - ansible_distribution in ['RedHat', 'CentOS'] + - ansible_distribution_major_version in ['7', '8'] + block: - name: Create EPEL {{ ansible_distribution_major_version }} command: cmd: >- @@ -23,9 +26,6 @@ - name: Enable EPEL 8 command: dnf config-manager --set-enabled epel when: ansible_distribution_major_version == '8' - when: - - ansible_distribution in ['RedHat', 'CentOS'] - - ansible_distribution_major_version in ['7', '8'] - name: Enable EPEL 6 copy: diff --git a/tests/tasks/get_NetworkManager_NVR.yml b/tests/tasks/get_NetworkManager_NVR.yml index d0fbf0d..d5d60a5 100644 --- a/tests/tasks/get_NetworkManager_NVR.yml +++ b/tests/tasks/get_NetworkManager_NVR.yml @@ -1,6 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause --- -- block: +- tags: + - always + block: - name: Get NetworkManager RPM version command: cmd: rpm -qa --qf '%{name}-%{version}-%{release}\n' NetworkManager @@ -13,6 +15,4 @@ - name: Show NetworkManager version debug: var: networkmanager_nvr - tags: - - always ... diff --git a/tests/tasks/get_profile_stat.yml b/tests/tasks/get_profile_stat.yml index 4b00d02..3d7d296 100644 --- a/tests/tasks/get_profile_stat.yml +++ b/tests/tasks/get_profile_stat.yml @@ -39,6 +39,9 @@ when: nm_profile_exists.rc == 0 - name: Check ansible_managed comment for the initscripts case + when: + - profile_stat.stat.exists + - nm_profile_exists.rc != 0 block: - name: Get the ansible_managed comment in ifcfg-{{ profile }} command: >- @@ -51,6 +54,3 @@ lsr_net_profile_ansible_managed: true when: - _result.stdout_lines | length == 1 - when: - - profile_stat.stat.exists - - nm_profile_exists.rc != 0 diff --git a/tests/tests_change_indication_on_repeat_run.yml b/tests/tests_change_indication_on_repeat_run.yml index e060274..5b58af5 100644 --- a/tests/tests_change_indication_on_repeat_run.yml +++ b/tests/tests_change_indication_on_repeat_run.yml @@ -55,7 +55,9 @@ assert: that: not __network_connections_result is changed always: - - block: + - tags: + - "tests::cleanup" + block: - include_role: name: linux-system-roles.network vars: @@ -67,5 +69,3 @@ - include_tasks: tasks/manage_test_interface.yml vars: state: absent - tags: - - "tests::cleanup" diff --git a/tests/tests_eth_pci_address_match_nm.yml b/tests/tests_eth_pci_address_match_nm.yml index 9fd5507..5fc946e 100644 --- a/tests/tests_eth_pci_address_match_nm.yml +++ b/tests/tests_eth_pci_address_match_nm.yml @@ -12,7 +12,11 @@ tags: - always - - block: + - when: + - ansible_distribution_major_version != '6' + tags: + - always + block: - name: Install NetworkManager package: name: NetworkManager @@ -21,10 +25,6 @@ command: rpm -q --qf "%{version}" NetworkManager register: networkmanager_version when: true - when: - - ansible_distribution_major_version != '6' - tags: - - always # The test requires or should run with NetworkManager, therefore it cannot run diff --git a/tests/tests_ethtool_coalesce_nm.yml b/tests/tests_ethtool_coalesce_nm.yml index e1e38e4..a5c48c8 100644 --- a/tests/tests_ethtool_coalesce_nm.yml +++ b/tests/tests_ethtool_coalesce_nm.yml @@ -12,7 +12,11 @@ tags: - always - - block: + - when: + - ansible_distribution_major_version != '6' + tags: + - always + block: - name: Install NetworkManager package: name: NetworkManager @@ -21,10 +25,6 @@ command: rpm -q --qf "%{version}" NetworkManager register: networkmanager_version when: true - when: - - ansible_distribution_major_version != '6' - tags: - - always # The test requires or should run with NetworkManager, therefore it cannot run diff --git a/tests/tests_ethtool_features_nm.yml b/tests/tests_ethtool_features_nm.yml index dbf31e0..b31455a 100644 --- a/tests/tests_ethtool_features_nm.yml +++ b/tests/tests_ethtool_features_nm.yml @@ -12,7 +12,11 @@ tags: - always - - block: + - when: + - ansible_distribution_major_version != '6' + tags: + - always + block: - name: Install NetworkManager package: name: NetworkManager @@ -21,10 +25,6 @@ command: rpm -q --qf "%{version}" NetworkManager register: networkmanager_version when: true - when: - - ansible_distribution_major_version != '6' - tags: - - always # The test requires or should run with NetworkManager, therefore it cannot run diff --git a/tests/tests_ethtool_ring_nm.yml b/tests/tests_ethtool_ring_nm.yml index e17c7e6..2f39c00 100644 --- a/tests/tests_ethtool_ring_nm.yml +++ b/tests/tests_ethtool_ring_nm.yml @@ -12,7 +12,11 @@ tags: - always - - block: + - when: + - ansible_distribution_major_version != '6' + tags: + - always + block: - name: Install NetworkManager package: name: NetworkManager @@ -21,10 +25,6 @@ command: rpm -q --qf "%{version}" NetworkManager register: networkmanager_version when: true - when: - - ansible_distribution_major_version != '6' - tags: - - always # The test requires or should run with NetworkManager, therefore it cannot run diff --git a/tests/tests_provider_nm.yml b/tests/tests_provider_nm.yml index 90a685a..0d024e6 100644 --- a/tests/tests_provider_nm.yml +++ b/tests/tests_provider_nm.yml @@ -12,7 +12,11 @@ tags: - always - - block: + - when: + - ansible_distribution_major_version != '6' + tags: + - always + block: - name: Install NetworkManager package: name: NetworkManager @@ -21,10 +25,6 @@ command: rpm -q --qf "%{version}" NetworkManager register: networkmanager_version when: true - when: - - ansible_distribution_major_version != '6' - tags: - - always # The test requires or should run with NetworkManager, therefore it cannot run