From 79a38c8a3a54e4c88b2febf8c089d4af792ac61b Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Fri, 15 Nov 2019 16:59:39 -0500 Subject: [PATCH] Fix firewalld integration tests for CentOS 8 (#64873) --- test/integration/targets/firewalld/tasks/main.yml | 4 ++-- .../integration/targets/firewalld/tasks/run_all_tests.yml | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/integration/targets/firewalld/tasks/main.yml b/test/integration/targets/firewalld/tasks/main.yml index 786edd3a78..84af185bb0 100644 --- a/test/integration/targets/firewalld/tasks/main.yml +++ b/test/integration/targets/firewalld/tasks/main.yml @@ -50,7 +50,7 @@ when: check_output.rc == 0 when: - - not (ansible_os_family == "RedHat" and ansible_distribution_major_version|int < 7) - - not (ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04") + - ansible_facts.os_family == "RedHat" and ansible_facts.distribution_major_version is version('7', '>=') + - not (ansible_distribution == "Ubuntu" and ansible_distribution_version is version('14.04', '==')) # Firewalld package on OpenSUSE (15+) require Python 3, so we skip on OpenSUSE running py2 on these newer distros - not (ansible_os_family == "Suse" and ansible_distribution_major_version|int != 42 and ansible_python.version.major != 3) diff --git a/test/integration/targets/firewalld/tasks/run_all_tests.yml b/test/integration/targets/firewalld/tasks/run_all_tests.yml index 80bc008d92..d463ef206f 100644 --- a/test/integration/targets/firewalld/tasks/run_all_tests.yml +++ b/test/integration/targets/firewalld/tasks/run_all_tests.yml @@ -22,10 +22,14 @@ state: directory # firewalld service operation test cases -- import_tasks: service_test_cases.yml +- include_tasks: service_test_cases.yml + # Skipping on CentOS 8 due to https://github.com/ansible/ansible/issues/64750 + when: not (ansible_facts.distribution == "CentOS" and ansible_distribution_major_version is version('8', '==')) # firewalld port operation test cases -- import_tasks: port_test_cases.yml +- include_tasks: port_test_cases.yml + # Skipping on CentOS 8 due to https://github.com/ansible/ansible/issues/64750 + when: not (ansible_facts.distribution == "CentOS" and ansible_distribution_major_version is version('8', '==')) # firewalld source operation test cases - import_tasks: source_test_cases.yml