diff --git a/.yamllint.yml b/.yamllint.yml index df2d7c8..fd511b7 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -25,3 +25,6 @@ rules: /tests/tests_ethtool_ring_initscripts.yml /tests/tests_wireless_wpa3_owe_nm.yml /tests/tasks/setup_mock_wifi_wpa3_owe.yml + /tests/tests_auto_gateway_initscripts.yml + /tests/tests_bond_deprecated_initscripts.yml + /tests/tests_ethtool_features_initscripts.yml diff --git a/tests/ensure_provider_tests.py b/tests/ensure_provider_tests.py index 9150cac..df36d5b 100755 --- a/tests/ensure_provider_tests.py +++ b/tests/ensure_provider_tests.py @@ -73,6 +73,8 @@ ibution_major_version | int < 9", "playbooks/tests_provider.yml": { MINIMUM_VERSION: "'1.20.0'", "comment": "# NetworKmanager 1.20.0 added support for forgetting profiles", + EXTRA_RUN_CONDITION: "ansible_distribution != 'RedHat' or\n ansible_distr\ +ibution_major_version | int < 9", }, "playbooks/tests_reapply.yml": {}, # team interface is not supported on Fedora @@ -127,6 +129,9 @@ RUN_PLAYBOOK_WITH_INITSCRIPTS = """# SPDX-License-Identifier: BSD-3-Clause - always - import_playbook: {test_playbook} + when: (ansible_distribution in ['CentOS','RedHat'] and\n \ +ansible_distribution_major_version | int < 9) or\n \ +ansible_distribution == 'Fedora' """ diff --git a/tests/tests_auto_gateway_initscripts.yml b/tests/tests_auto_gateway_initscripts.yml index 2caaf6b..3cb2fdc 100644 --- a/tests/tests_auto_gateway_initscripts.yml +++ b/tests/tests_auto_gateway_initscripts.yml @@ -2,10 +2,9 @@ # This file was generated by ensure_provider_tests.py --- - hosts: all - name: > - Run playbook 'playbooks/tests_auto_gateway.yml' with - initscripts as provider + name: Run playbook 'playbooks/tests_auto_gateway.yml' with initscripts as provider tasks: + - include_tasks: tasks/el_repo_setup.yml - name: Set network provider to 'initscripts' set_fact: network_provider: initscripts @@ -13,3 +12,6 @@ - always - import_playbook: playbooks/tests_auto_gateway.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora' diff --git a/tests/tests_bond_deprecated_initscripts.yml b/tests/tests_bond_deprecated_initscripts.yml index 1e74bcc..d1e0ec1 100644 --- a/tests/tests_bond_deprecated_initscripts.yml +++ b/tests/tests_bond_deprecated_initscripts.yml @@ -2,7 +2,7 @@ # This file was generated by ensure_provider_tests.py --- - hosts: all - name: Run playbook 'playbooks/tests_bond_deprecated.yml' with initscripts + name: Run playbook 'playbooks/tests_bond_deprecated.yml' with initscripts as provider tasks: - include_tasks: tasks/el_repo_setup.yml - name: Set network provider to 'initscripts' @@ -12,3 +12,6 @@ - always - import_playbook: playbooks/tests_bond_deprecated.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora' diff --git a/tests/tests_bond_initscripts.yml b/tests/tests_bond_initscripts.yml index 32fcc32..29f3419 100644 --- a/tests/tests_bond_initscripts.yml +++ b/tests/tests_bond_initscripts.yml @@ -12,3 +12,6 @@ - always - import_playbook: playbooks/tests_bond.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora' diff --git a/tests/tests_bridge_initscripts.yml b/tests/tests_bridge_initscripts.yml index 8ce42e6..4e8a52f 100644 --- a/tests/tests_bridge_initscripts.yml +++ b/tests/tests_bridge_initscripts.yml @@ -12,3 +12,6 @@ - always - import_playbook: playbooks/tests_bridge.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora' diff --git a/tests/tests_default_initscripts.yml b/tests/tests_default_initscripts.yml index 006889c..6e983bc 100644 --- a/tests/tests_default_initscripts.yml +++ b/tests/tests_default_initscripts.yml @@ -8,3 +8,6 @@ network_provider: initscripts - import_playbook: tests_default.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora' diff --git a/tests/tests_ethernet_initscripts.yml b/tests/tests_ethernet_initscripts.yml index 366b052..17974c3 100644 --- a/tests/tests_ethernet_initscripts.yml +++ b/tests/tests_ethernet_initscripts.yml @@ -5,7 +5,6 @@ name: Run playbook 'playbooks/tests_ethernet.yml' with initscripts as provider tasks: - include_tasks: tasks/el_repo_setup.yml - - name: Set network provider to 'initscripts' set_fact: network_provider: initscripts @@ -13,3 +12,6 @@ - always - import_playbook: playbooks/tests_ethernet.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora' diff --git a/tests/tests_ethtool_coalesce_initscripts.yml b/tests/tests_ethtool_coalesce_initscripts.yml index 7d06d81..1798780 100644 --- a/tests/tests_ethtool_coalesce_initscripts.yml +++ b/tests/tests_ethtool_coalesce_initscripts.yml @@ -4,6 +4,7 @@ - hosts: all name: Run playbook 'playbooks/tests_ethtool_coalesce.yml' with initscripts as provider tasks: + - include_tasks: tasks/el_repo_setup.yml - name: Set network provider to 'initscripts' set_fact: network_provider: initscripts @@ -11,3 +12,6 @@ - always - import_playbook: playbooks/tests_ethtool_coalesce.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora' diff --git a/tests/tests_ethtool_features_initscripts.yml b/tests/tests_ethtool_features_initscripts.yml index 5bac5d3..5a3f334 100644 --- a/tests/tests_ethtool_features_initscripts.yml +++ b/tests/tests_ethtool_features_initscripts.yml @@ -1,14 +1,17 @@ +# SPDX-License-Identifier: BSD-3-Clause +# This file was generated by ensure_provider_tests.py --- -# set network provider and gather facts - hosts: all + name: Run playbook 'playbooks/tests_ethtool_features.yml' with initscripts as provider tasks: - include_tasks: tasks/el_repo_setup.yml - name: Set network provider to 'initscripts' set_fact: network_provider: initscripts + tags: + - always -# workaround for: https://github.com/ansible/ansible/issues/27973 -# There is no way in Ansible to abort a playbook hosts with specific OS -# releases Therefore we include the playbook with the tests only if the hosts -# would support it. - import_playbook: playbooks/tests_ethtool_features.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora' diff --git a/tests/tests_ethtool_ring_initscripts.yml b/tests/tests_ethtool_ring_initscripts.yml index 356ca2c..aaa0545 100644 --- a/tests/tests_ethtool_ring_initscripts.yml +++ b/tests/tests_ethtool_ring_initscripts.yml @@ -4,6 +4,7 @@ - hosts: all name: Run playbook 'playbooks/tests_ethtool_ring.yml' with initscripts as provider tasks: + - include_tasks: tasks/el_repo_setup.yml - name: Set network provider to 'initscripts' set_fact: network_provider: initscripts @@ -11,3 +12,6 @@ - always - import_playbook: playbooks/tests_ethtool_ring.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora' diff --git a/tests/tests_ipv6_initscripts.yml b/tests/tests_ipv6_initscripts.yml index 736a8e0..d017783 100644 --- a/tests/tests_ipv6_initscripts.yml +++ b/tests/tests_ipv6_initscripts.yml @@ -4,6 +4,7 @@ - hosts: all name: Run playbook 'playbooks/tests_ipv6.yml' with initscripts as provider tasks: + - include_tasks: tasks/el_repo_setup.yml - name: Set network provider to 'initscripts' set_fact: network_provider: initscripts @@ -11,3 +12,6 @@ - always - import_playbook: playbooks/tests_ipv6.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora' diff --git a/tests/tests_provider_nm.yml b/tests/tests_provider_nm.yml index ee9695f..5d85231 100644 --- a/tests/tests_provider_nm.yml +++ b/tests/tests_provider_nm.yml @@ -36,3 +36,5 @@ - ansible_distribution_major_version != '6' - NetworkManager_version.stdout is version('1.20.0', '>=') + - ansible_distribution != 'RedHat' or + ansible_distribution_major_version | int < 9 diff --git a/tests/tests_regression_nm.yml b/tests/tests_regression_nm.yml index b2c46e9..917ee4f 100644 --- a/tests/tests_regression_nm.yml +++ b/tests/tests_regression_nm.yml @@ -29,3 +29,5 @@ - ansible_distribution_major_version != '6' # The test depends on behavior that is only visible with newer NM - NetworkManager_version.stdout is version('1.22.0', '>=') + - ansible_distribution != 'RedHat' or + ansible_distribution_major_version | int < 9 diff --git a/tests/tests_states_initscripts.yml b/tests/tests_states_initscripts.yml index fa94103..efc7abe 100644 --- a/tests/tests_states_initscripts.yml +++ b/tests/tests_states_initscripts.yml @@ -5,7 +5,6 @@ name: Run playbook 'playbooks/tests_states.yml' with initscripts as provider tasks: - include_tasks: tasks/el_repo_setup.yml - - name: Set network provider to 'initscripts' set_fact: network_provider: initscripts @@ -13,3 +12,6 @@ - always - import_playbook: playbooks/tests_states.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora' diff --git a/tests/tests_vlan_mtu_initscripts.yml b/tests/tests_vlan_mtu_initscripts.yml index dcd5d74..7ee38dd 100644 --- a/tests/tests_vlan_mtu_initscripts.yml +++ b/tests/tests_vlan_mtu_initscripts.yml @@ -5,7 +5,6 @@ name: Run playbook 'playbooks/tests_vlan_mtu.yml' with initscripts as provider tasks: - include_tasks: tasks/el_repo_setup.yml - - name: Set network provider to 'initscripts' set_fact: network_provider: initscripts @@ -13,3 +12,6 @@ - always - import_playbook: playbooks/tests_vlan_mtu.yml + when: (ansible_distribution in ['CentOS','RedHat'] and + ansible_distribution_major_version | int < 9) or + ansible_distribution == 'Fedora'