summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorJordan Borean <jborean93@gmail.com>2019-02-19 04:20:08 +0100
committerGitHub <noreply@github.com>2019-02-19 04:20:08 +0100
commitc312287731b4658deadbc36edde391d2f6f16ee8 (patch)
treee42ef1d983f491036f140ab29bef1340c5302e3f /test/integration
parentforeman: Use generic python in test run (#52544) (diff)
downloadansible-c312287731b4658deadbc36edde391d2f6f16ee8.tar.xz
ansible-c312287731b4658deadbc36edde391d2f6f16ee8.zip
test suse: get tests working on newer OpenSUSE distributions (#52539)
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/targets/cloud_init_data_facts/tasks/main.yml6
-rw-r--r--test/integration/targets/firewalld/tasks/main.yml7
2 files changed, 10 insertions, 3 deletions
diff --git a/test/integration/targets/cloud_init_data_facts/tasks/main.yml b/test/integration/targets/cloud_init_data_facts/tasks/main.yml
index 0178acf6c4..eca905c6c2 100644
--- a/test/integration/targets/cloud_init_data_facts/tasks/main.yml
+++ b/test/integration/targets/cloud_init_data_facts/tasks/main.yml
@@ -5,7 +5,11 @@
# to /etc/init/ureadahead.conf.disabled by cloud-init' clashes with `local diversion of
# /etc/init/ureadahead.conf to /etc/init/ureadahead.conf.distrib
# https://bugs.launchpad.net/ubuntu/+source/ureadahead/+bug/997838
- when: ansible_distribution != "Ubuntu" or ansible_distribution_major_version|int != 14
+ # Will also have to skip on OpenSUSE when running on Python 2 on newer Leap versions
+ # (!= 42 and >= 15) ascloud-init will install the Python 3 package, breaking our build on py2.
+ when:
+ - not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int == 14)
+ - not (ansible_os_family == "Suse" and ansible_distribution_major_version|int != 42 and ansible_python.version.major != 3)
block:
- name: setup install cloud-init
package:
diff --git a/test/integration/targets/firewalld/tasks/main.yml b/test/integration/targets/firewalld/tasks/main.yml
index 1cc9895698..3740645834 100644
--- a/test/integration/targets/firewalld/tasks/main.yml
+++ b/test/integration/targets/firewalld/tasks/main.yml
@@ -31,5 +31,8 @@
- import_tasks: run_all_tests.yml
when: check_output.rc == 0
- when: not (ansible_os_family == "RedHat" and ansible_distribution_major_version|int < 7) and
- not (ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04")
+ when:
+ - not (ansible_os_family == "RedHat" and ansible_distribution_major_version|int < 7)
+ - not (ansible_distribution == "Ubuntu" and ansible_distribution_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)