From 43d650f924e4191cc736701e7a78940f99ee84bd Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Thu, 26 May 2022 11:44:27 -0700 Subject: [PATCH] Add RHEL 9.0 to CI. (#77853) * Add RHEL 9.0 to CI. * Restrict network manager inspection to RHEL8 * Skip module tests when astream_name is undefined, undefine it for RHEL9 until 9.1 * Remove redundant test. Co-authored-by: Matt Martz --- .azure-pipelines/azure-pipelines.yml | 2 ++ test/integration/targets/dnf/tasks/main.yml | 6 ++++-- .../integration/targets/dnf/vars/RedHat-9.yml | 5 +++-- .../targets/hostname/tasks/test_normal.yml | 4 ++-- .../targets/rpm_key/tasks/rpm_key.yaml | 19 ++----------------- 5 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 3c627b2fcdb..8c7ecb18b01 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -95,6 +95,8 @@ stages: test: rhel/8.6@3.6 - name: RHEL 8.6 py38 test: rhel/8.6@3.8 + - name: RHEL 9.0 + test: rhel/9.0 - name: FreeBSD 12.3 test: freebsd/12.3 - name: FreeBSD 13.1 diff --git a/test/integration/targets/dnf/tasks/main.yml b/test/integration/targets/dnf/tasks/main.yml index 591dc33abda..96e5cbfaced 100644 --- a/test/integration/targets/dnf/tasks/main.yml +++ b/test/integration/targets/dnf/tasks/main.yml @@ -54,8 +54,10 @@ - ansible_distribution_major_version is version('23', '>=') - include_tasks: modularity.yml - when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('29', '>=')) or - (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>=')) + when: + - astream_name is defined + - (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('29', '>=')) or + (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>=')) tags: - dnf_modularity diff --git a/test/integration/targets/dnf/vars/RedHat-9.yml b/test/integration/targets/dnf/vars/RedHat-9.yml index e700a9b9afc..5681e7019d4 100644 --- a/test/integration/targets/dnf/vars/RedHat-9.yml +++ b/test/integration/targets/dnf/vars/RedHat-9.yml @@ -1,2 +1,3 @@ -astream_name: '@container-tools:latest/common' -astream_name_no_stream: '@container-tools/common' +# RHEL9.0 contains no modules, to be re-introduced in 9.1 +# astream_name: '@container-tools:latest/common' +# astream_name_no_stream: '@container-tools/common' diff --git a/test/integration/targets/hostname/tasks/test_normal.yml b/test/integration/targets/hostname/tasks/test_normal.yml index ed5ac735863..9534d73badf 100644 --- a/test/integration/targets/hostname/tasks/test_normal.yml +++ b/test/integration/targets/hostname/tasks/test_normal.yml @@ -1,5 +1,5 @@ - name: Ensure hostname doesn't confuse NetworkManager - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'RedHat' and ansible_distribution_major_version is version('8') block: - name: slurp /var/log/messages slurp: @@ -23,7 +23,7 @@ register: current_after_hn2 - name: Ensure hostname doesn't confuse NetworkManager - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'RedHat' and ansible_distribution_major_version is version('8') block: - name: slurp /var/log/messages slurp: diff --git a/test/integration/targets/rpm_key/tasks/rpm_key.yaml b/test/integration/targets/rpm_key/tasks/rpm_key.yaml index 24fbbaeec29..89ed2361002 100644 --- a/test/integration/targets/rpm_key/tasks/rpm_key.yaml +++ b/test/integration/targets/rpm_key/tasks/rpm_key.yaml @@ -29,11 +29,6 @@ url: https://ci-files.testing.ansible.com/test/integration/targets/rpm_key/sl-5.02-1.el7.x86_64.rpm dest: /tmp/sl.rpm -- name: download Mono key - get_url: - url: https://ci-files.testing.ansible.com/test/integration/targets/rpm_key/mono.gpg - dest: /tmp/mono.gpg - - name: remove EPEL GPG key from keyring rpm_key: state: absent @@ -69,21 +64,11 @@ rpm_key: state: present key: /tmp/RPM-GPG-KEY-EPEL-7 - -- name: add Mono gpg key - rpm_key: - state: present - key: /tmp/mono.gpg - -- name: add Mono gpg key - rpm_key: - state: present - key: /tmp/mono.gpg - register: mono_indempotence + register: key_idempotence - name: verify idempotence assert: - that: "not mono_indempotence.changed" + that: "not key_idempotence.changed" - name: check GPG signature of sl. Should return okay shell: "rpm --checksig /tmp/sl.rpm"