diff options
author | Matt Clay <mclay@redhat.com> | 2021-11-04 18:48:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-04 18:48:34 +0100 |
commit | 730194e2b61e3d3b3037c8da49ecc5a09e64adea (patch) | |
tree | a07c4070f7c68e0580e0c0ef45792d659a7a9369 /test/integration/targets | |
parent | Update dev guide for vars plugins in collections (#75861) (diff) | |
download | ansible-730194e2b61e3d3b3037c8da49ecc5a09e64adea.tar.xz ansible-730194e2b61e3d3b3037c8da49ecc5a09e64adea.zip |
ansible-test - Add RHEL 9 support. (#76217)
* Move RHEL pip package install into function.
* Add RHEL 9 support to bootstrap script.
* ansible-test - Add RHEL 9 support.
* Add install and uninstall instructions for RHEL9 to paramiko tests
* Skip incidental_inventory_docker_swarm on RHEL 9.
* Update dnf tests for rhel9
* Fix prepare_http_tests on RHEL 9.
* fix RHEL9 Python discovery tests to match distro map
* Skip subversion test on RHEL 9.0b.
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Matt Davis <mrd@redhat.com>
Diffstat (limited to 'test/integration/targets')
11 files changed, 41 insertions, 3 deletions
diff --git a/test/integration/targets/dnf/tasks/main.yml b/test/integration/targets/dnf/tasks/main.yml index d66a06530b..45187f9a61 100644 --- a/test/integration/targets/dnf/tasks/main.yml +++ b/test/integration/targets/dnf/tasks/main.yml @@ -66,10 +66,12 @@ # # This fails due to conflicts on Fedora 34, but we can nuke this entirely once # #74224 lands, because it covers nobest cases. +# Skipped in RHEL9 by changing the version test to == instead of >= +# due to missing RHEL9 docker-ce packages currently - include_tasks: nobest.yml when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('24', '>=') and ansible_distribution_major_version is version('34', '!=')) or - (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>=')) + (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '==')) - include_tasks: cacheonly.yml diff --git a/test/integration/targets/dnf/vars/RedHat-9.yml b/test/integration/targets/dnf/vars/RedHat-9.yml new file mode 100644 index 0000000000..e700a9b9af --- /dev/null +++ b/test/integration/targets/dnf/vars/RedHat-9.yml @@ -0,0 +1,2 @@ +astream_name: '@container-tools:latest/common' +astream_name_no_stream: '@container-tools/common' diff --git a/test/integration/targets/incidental_inventory_docker_swarm/aliases b/test/integration/targets/incidental_inventory_docker_swarm/aliases index 74d3befedf..66362758d5 100644 --- a/test/integration/targets/incidental_inventory_docker_swarm/aliases +++ b/test/integration/targets/incidental_inventory_docker_swarm/aliases @@ -3,6 +3,7 @@ context/controller skip/osx skip/macos skip/freebsd +skip/rhel/9.0b # there are no docker-ce packages for CentOS/RHEL 9 destructive skip/docker # The tests sometimes make docker daemon unstable; hence, # we skip all docker-based CI runs to avoid disrupting diff --git a/test/integration/targets/interpreter_discovery_python/tasks/main.yml b/test/integration/targets/interpreter_discovery_python/tasks/main.yml index 770de0c591..c8b064df31 100644 --- a/test/integration/targets/interpreter_discovery_python/tasks/main.yml +++ b/test/integration/targets/interpreter_discovery_python/tasks/main.yml @@ -157,8 +157,10 @@ that: # rhel 6/7 - (auto_out.ansible_facts.discovered_interpreter_python == '/usr/bin/python' and distro_version is version('8','<')) or distro_version is version('8','>=') - # rhel 8+ - - (auto_out.ansible_facts.discovered_interpreter_python == '/usr/libexec/platform-python' and distro_version is version('8','>=')) or distro_version is version('8','<') + # rhel 8 + - (auto_out.ansible_facts.discovered_interpreter_python == '/usr/libexec/platform-python' and distro_version is version('8','==')) or distro_version is version('8','!=') + # rhel 9 + - (auto_out.ansible_facts.discovered_interpreter_python == '/usr/bin/python3' and distro_version is version('9','==')) or distro_version is version('9','!=') when: distro == 'redhat' - name: ubuntu assertions diff --git a/test/integration/targets/prepare_http_tests/tasks/main.yml b/test/integration/targets/prepare_http_tests/tasks/main.yml index 9ab00221ad..8d34a3cd7b 100644 --- a/test/integration/targets/prepare_http_tests/tasks/main.yml +++ b/test/integration/targets/prepare_http_tests/tasks/main.yml @@ -16,6 +16,7 @@ - include_tasks: "{{ lookup('first_found', files)}}" vars: files: + - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_os_family | lower }}.yml" - "default.yml" when: diff --git a/test/integration/targets/prepare_http_tests/vars/RedHat-9.yml b/test/integration/targets/prepare_http_tests/vars/RedHat-9.yml new file mode 100644 index 0000000000..2618233cbd --- /dev/null +++ b/test/integration/targets/prepare_http_tests/vars/RedHat-9.yml @@ -0,0 +1,4 @@ +krb5_packages: +- krb5-devel +- krb5-workstation +- redhat-rpm-config # needed for gssapi install diff --git a/test/integration/targets/setup_paramiko/install-RedHat-9-python-3.yml b/test/integration/targets/setup_paramiko/install-RedHat-9-python-3.yml new file mode 100644 index 0000000000..ca391556e6 --- /dev/null +++ b/test/integration/targets/setup_paramiko/install-RedHat-9-python-3.yml @@ -0,0 +1,9 @@ +- name: Setup remote constraints + include_tasks: setup-remote-constraints.yml +- name: Install Paramiko for Python 3 on RHEL 9 + pip: # no python3-paramiko package exists for RHEL 9 + name: paramiko + extra_args: "-c {{ remote_constraints }}" + +- name: Drop the crypto-policy to LEGACY for these tests + command: update-crypto-policies --set LEGACY diff --git a/test/integration/targets/setup_paramiko/uninstall-RedHat-9-python-3.yml b/test/integration/targets/setup_paramiko/uninstall-RedHat-9-python-3.yml new file mode 100644 index 0000000000..f46ec55bea --- /dev/null +++ b/test/integration/targets/setup_paramiko/uninstall-RedHat-9-python-3.yml @@ -0,0 +1,7 @@ +- name: Uninstall Paramiko for Python 3 on RHEL 9 + pip: # no python3-paramiko package exists for RHEL 9 + name: paramiko + state: absent + +- name: Revert the crypto-policy back to DEFAULT + command: update-crypto-policies --set DEFAULT diff --git a/test/integration/targets/setup_rpm_repo/tasks/main.yml b/test/integration/targets/setup_rpm_repo/tasks/main.yml index b2c9ae1ba6..be20078f1b 100644 --- a/test/integration/targets/setup_rpm_repo/tasks/main.yml +++ b/test/integration/targets/setup_rpm_repo/tasks/main.yml @@ -24,6 +24,11 @@ args: name: "{{ rpm_repo_packages }}" + - name: Install rpmfluff via pip + pip: + name: rpmfluff + when: ansible_facts.os_family == 'RedHat' and ansible_distribution_major_version is version('9', '==') + - set_fact: repos: - "fake-{{ ansible_architecture }}" diff --git a/test/integration/targets/setup_rpm_repo/vars/RedHat-9.yml b/test/integration/targets/setup_rpm_repo/vars/RedHat-9.yml new file mode 100644 index 0000000000..84849e2341 --- /dev/null +++ b/test/integration/targets/setup_rpm_repo/vars/RedHat-9.yml @@ -0,0 +1,4 @@ +rpm_repo_packages: + - rpm-build + - createrepo_c + - createrepo diff --git a/test/integration/targets/subversion/aliases b/test/integration/targets/subversion/aliases index 1dd2724ef2..dcac1f747a 100644 --- a/test/integration/targets/subversion/aliases +++ b/test/integration/targets/subversion/aliases @@ -3,5 +3,6 @@ shippable/posix/group2 skip/aix skip/osx skip/macos +skip/rhel/9.0b # svn checkout hangs destructive needs/root |