Add RHEL 7.9 (#72558) - 2.10 (#72568)

* Add RHEL 7.9 - ci_complete (#72558)

(cherry picked from commit d451433e5d)

* Added changelog for RHEL 7.9 (#72572)

(cherry picked from commit bdd0c48837)
This commit is contained in:
Jordan Borean 2020-12-02 06:51:15 +10:00 committed by GitHub
parent 6322630360
commit 7802ca2b06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 148 additions and 139 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Added the ``-remote rhel/7.9`` option to run tests on RHEL 7.9

View file

@ -28,7 +28,7 @@ matrix:
- env: T=windows/2019/1
- env: T=macos/10.15/1
- env: T=rhel/7.8/1
- env: T=rhel/7.9/1
- env: T=rhel/8.2/1
- env: T=freebsd/11.1/1
- env: T=freebsd/12.1/1
@ -43,7 +43,7 @@ matrix:
- env: T=linux/ubuntu1804/1
- env: T=macos/10.15/2
- env: T=rhel/7.8/2
- env: T=rhel/7.9/2
- env: T=rhel/8.2/2
- env: T=freebsd/11.1/2
- env: T=freebsd/12.1/2
@ -58,7 +58,7 @@ matrix:
- env: T=linux/ubuntu1804/2
- env: T=macos/10.15/3
- env: T=rhel/7.8/3
- env: T=rhel/7.9/3
- env: T=rhel/8.2/3
- env: T=freebsd/11.1/3
- env: T=freebsd/12.1/3
@ -73,7 +73,7 @@ matrix:
- env: T=linux/ubuntu1804/3
- env: T=macos/10.15/4
- env: T=rhel/7.8/4
- env: T=rhel/7.9/4
- env: T=rhel/8.2/4
- env: T=freebsd/11.1/4
- env: T=freebsd/12.1/4
@ -88,7 +88,7 @@ matrix:
- env: T=linux/ubuntu1804/4
- env: T=macos/10.15/5
- env: T=rhel/7.8/5
- env: T=rhel/7.9/5
- env: T=rhel/8.2/5
- env: T=freebsd/11.1/5
- env: T=freebsd/12.1/5
@ -109,7 +109,7 @@ matrix:
- env: T=generic/3.6/1
- env: T=i/osx/10.11
- env: T=i/rhel/7.8
- env: T=i/rhel/7.9
- env: T=i/rhel/8.2
- env: T=i/freebsd/11.1
- env: T=i/freebsd/12.1

View file

@ -4,14 +4,18 @@
# Note: We install the yum package onto Fedora so that this will work on dnf systems
# We want to test that for people who don't want to upgrade their systems.
- block:
- name: ensure test packages are removed before starting
yum:
name:
- sos
state: absent
- import_tasks: yum.yml
always:
- name: remove installed packages
yum:
name:
- bc
- sos
state: absent

View file

@ -1,22 +1,27 @@
# Setup by setup_rpm_repo
- set_fact:
package1: dinginessentail
package2: dinginessentail-olive
# UNINSTALL
- name: uninstall sos
yum: name=sos state=removed
- name: uninstall {{ package1 }}
yum: name={{ package1 }} state=removed
register: yum_result
- name: check sos with rpm
shell: rpm -q sos
- name: check {{ package1 }} with rpm
shell: rpm -q {{ package1 }}
ignore_errors: True
register: rpm_result
- name: verify uninstallation of sos
- name: verify uninstallation of {{ package1 }}
assert:
that:
- "yum_result is success"
- "rpm_result is failed"
# UNINSTALL AGAIN
- name: uninstall sos again in check mode
yum: name=sos state=removed
- name: uninstall {{ package1 }} again in check mode
yum: name={{ package1 }} state=removed
check_mode: true
register: yum_result
@ -25,8 +30,8 @@
that:
- "not yum_result is changed"
- name: uninstall sos again
yum: name=sos state=removed
- name: uninstall {{ package1 }} again
yum: name={{ package1 }} state=removed
register: yum_result
- name: verify no change on re-uninstall
@ -35,21 +40,21 @@
- "not yum_result is changed"
# INSTALL
- name: install sos in check mode
yum: name=sos state=present
- name: install {{ package1 }} in check mode
yum: name={{ package1 }} state=present
check_mode: true
register: yum_result
- name: verify installation of sos in check mode
- name: verify installation of {{ package1 }} in check mode
assert:
that:
- "yum_result is changed"
- name: install sos
yum: name=sos state=present
- name: install {{ package1 }}
yum: name={{ package1 }} state=present
register: yum_result
- name: verify installation of sos
- name: verify installation of {{ package1 }}
assert:
that:
- "yum_result is success"
@ -62,12 +67,12 @@
- "'msg' in yum_result"
- "'results' in yum_result"
- name: check sos with rpm
shell: rpm -q sos
- name: check {{ package1 }} with rpm
shell: rpm -q {{ package1 }}
# INSTALL AGAIN
- name: install sos again in check mode
yum: name=sos state=present
- name: install {{ package1 }} again in check mode
yum: name={{ package1 }} state=present
check_mode: true
register: yum_result
- name: verify no change on second install in check mode
@ -75,16 +80,16 @@
that:
- "not yum_result is changed"
- name: install sos again
yum: name=sos state=present
- name: install {{ package1 }} again
yum: name={{ package1 }} state=present
register: yum_result
- name: verify no change on second install
assert:
that:
- "not yum_result is changed"
- name: install sos again with empty string enablerepo
yum: name=sos state=present enablerepo=""
- name: install {{ package1 }} again with empty string enablerepo
yum: name={{ package1 }} state=present enablerepo=""
register: yum_result
- name: verify no change on third install with empty string enablerepo
assert:
@ -94,14 +99,11 @@
# This test case is unfortunately distro specific because we have to specify
# repo names which are not the same across Fedora/RHEL/CentOS for base/updates
- name: install sos again with missing repo enablerepo
- name: install {{ package1 }} again with missing repo enablerepo
yum:
name: sos
name: '{{ package1 }}'
state: present
enablerepo:
- "thisrepodoesnotexist"
- "base"
- "updates"
enablerepo: '{{ repos + ["thisrepodoesnotexist"] }}'
disablerepo: "*"
register: yum_result
when: ansible_distribution == 'CentOS'
@ -114,13 +116,11 @@
# This test case is unfortunately distro specific because we have to specify
# repo names which are not the same across Fedora/RHEL/CentOS for base/updates
- name: install sos again with disable all and enable select repo(s)
- name: install repos again with disable all and enable select repo(s)
yum:
name: sos
name: '{{ package1 }}'
state: present
enablerepo:
- "base"
- "updates"
enablerepo: '{{ repos }}'
disablerepo: "*"
register: yum_result
when: ansible_distribution == 'CentOS'
@ -131,9 +131,9 @@
- "yum_result is not changed"
when: ansible_distribution == 'CentOS'
- name: install sos again with only missing repo enablerepo
- name: install {{ package1 }} again with only missing repo enablerepo
yum:
name: sos
name: '{{ package1 }}'
state: present
enablerepo: "thisrepodoesnotexist"
ignore_errors: true
@ -150,28 +150,28 @@
when: ansible_pkg_mgr == 'dnf'
# INSTALL AGAIN WITH LATEST
- name: install sos again with state latest in check mode
yum: name=sos state=latest
- name: install {{ package1 }} again with state latest in check mode
yum: name={{ package1 }} state=latest
check_mode: true
register: yum_result
- name: verify install sos again with state latest in check mode
- name: verify install {{ package1 }} again with state latest in check mode
assert:
that:
- "not yum_result is changed"
- name: install sos again with state latest idempotence
yum: name=sos state=latest
- name: install {{ package1 }} again with state latest idempotence
yum: name={{ package1 }} state=latest
register: yum_result
- name: verify install sos again with state latest idempotence
- name: verify install {{ package1 }} again with state latest idempotence
assert:
that:
- "not yum_result is changed"
# INSTALL WITH LATEST
- name: uninstall sos
yum: name=sos state=removed
- name: uninstall {{ package1 }}
yum: name={{ package1 }} state=removed
register: yum_result
- name: verify uninstall sos
- name: verify uninstall {{ package1 }}
assert:
that:
- "yum_result is successful"
@ -184,11 +184,11 @@
register: yum_conf_copy
- block:
- name: install sos with state latest in check mode with config file param
yum: name=sos state=latest conf_file=/etc/yum.conf
- name: install {{ package1 }} with state latest in check mode with config file param
yum: name={{ package1 }} state=latest conf_file=/etc/yum.conf
check_mode: true
register: yum_result
- name: verify install sos with state latest in check mode with config file param
- name: verify install {{ package1 }} with state latest in check mode with config file param
assert:
that:
- "yum_result is changed"
@ -200,62 +200,62 @@
state: absent
when: yum_conf_copy is changed
- name: install sos with state latest in check mode
yum: name=sos state=latest
- name: install {{ package1 }} with state latest in check mode
yum: name={{ package1 }} state=latest
check_mode: true
register: yum_result
- name: verify install sos with state latest in check mode
- name: verify install {{ package1 }} with state latest in check mode
assert:
that:
- "yum_result is changed"
- name: install sos with state latest
yum: name=sos state=latest
- name: install {{ package1 }} with state latest
yum: name={{ package1 }} state=latest
register: yum_result
- name: verify install sos with state latest
- name: verify install {{ package1 }} with state latest
assert:
that:
- "yum_result is changed"
- name: install sos with state latest idempotence
yum: name=sos state=latest
- name: install {{ package1 }} with state latest idempotence
yum: name={{ package1 }} state=latest
register: yum_result
- name: verify install sos with state latest idempotence
- name: verify install {{ package1 }} with state latest idempotence
assert:
that:
- "not yum_result is changed"
- name: install sos with state latest idempotence with config file param
yum: name=sos state=latest
- name: install {{ package1 }} with state latest idempotence with config file param
yum: name={{ package1 }} state=latest
register: yum_result
- name: verify install sos with state latest idempotence with config file param
- name: verify install {{ package1 }} with state latest idempotence with config file param
assert:
that:
- "not yum_result is changed"
# Multiple packages
- name: uninstall sos and bc
yum: name=sos,bc state=removed
- name: uninstall {{ package1 }} and {{ package2 }}
yum: name={{ package1 }},{{ package2 }} state=removed
- name: check sos with rpm
shell: rpm -q sos
- name: check {{ package1 }} with rpm
shell: rpm -q {{ package1 }}
ignore_errors: True
register: rpm_sos_result
register: rpm_package1_result
- name: check bc with rpm
shell: rpm -q bc
- name: check {{ package2 }} with rpm
shell: rpm -q {{ package2 }}
ignore_errors: True
register: rpm_bc_result
register: rpm_package2_result
- name: verify packages installed
assert:
that:
- "rpm_sos_result is failed"
- "rpm_bc_result is failed"
- "rpm_package1_result is failed"
- "rpm_package2_result is failed"
- name: install sos and bc as comma separated
yum: name=sos,bc state=present
- name: install {{ package1 }} and {{ package2 }} as comma separated
yum: name={{ package1 }},{{ package2 }} state=present
register: yum_result
- name: verify packages installed
@ -264,21 +264,21 @@
- "yum_result is success"
- "yum_result is changed"
- name: check sos with rpm
shell: rpm -q sos
- name: check {{ package1 }} with rpm
shell: rpm -q {{ package1 }}
- name: check bc with rpm
shell: rpm -q bc
- name: check {{ package2 }} with rpm
shell: rpm -q {{ package2 }}
- name: uninstall sos and bc
yum: name=sos,bc state=removed
- name: uninstall {{ package1 }} and {{ package2 }}
yum: name={{ package1 }},{{ package2 }} state=removed
register: yum_result
- name: install sos and bc as list
- name: install {{ package1 }} and {{ package2 }} as list
yum:
name:
- sos
- bc
- '{{ package1 }}'
- '{{ package2 }}'
state: present
register: yum_result
@ -288,19 +288,19 @@
- "yum_result is success"
- "yum_result is changed"
- name: check sos with rpm
shell: rpm -q sos
- name: check {{ package1 }} with rpm
shell: rpm -q {{ package1 }}
- name: check bc with rpm
shell: rpm -q bc
- name: check {{ package2 }} with rpm
shell: rpm -q {{ package2 }}
- name: uninstall sos and bc
yum: name=sos,bc state=removed
- name: uninstall {{ package1 }} and {{ package2 }}
yum: name={{ package1 }},{{ package2 }} state=removed
register: yum_result
- name: install sos and bc as comma separated with spaces
- name: install {{ package1 }} and {{ package2 }} as comma separated with spaces
yum:
name: "sos, bc"
name: "{{ package1 }}, {{ package2 }}"
state: present
register: yum_result
@ -310,14 +310,14 @@
- "yum_result is success"
- "yum_result is changed"
- name: check sos with rpm
shell: rpm -q sos
- name: check {{ package1 }} with rpm
shell: rpm -q {{ package1 }}
- name: check bc with rpm
shell: rpm -q bc
- name: check {{ package2 }} with rpm
shell: rpm -q {{ package2 }}
- name: uninstall sos and bc
yum: name=sos,bc state=removed
- name: uninstall {{ package1 }} and {{ package2 }}
yum: name={{ package1 }},{{ package2 }} state=removed
- name: install non-existent rpm
yum:
@ -331,11 +331,11 @@
- non_existent_rpm is failed
# Install in installroot='/'
- name: install sos
yum: name=sos state=present installroot='/'
- name: install {{ package1 }}
yum: name={{ package1 }} state=present installroot='/'
register: yum_result
- name: verify installation of sos
- name: verify installation of {{ package1 }}
assert:
that:
- "yum_result is success"
@ -348,16 +348,18 @@
- "'msg' in yum_result"
- "'results' in yum_result"
- name: check sos with rpm
shell: rpm -q sos --root=/
- name: check {{ package1 }} with rpm
shell: rpm -q {{ package1 }} --root=/
- name: uninstall sos
- name: uninstall {{ package1 }}
yum:
name: sos
name: '{{ package1 }}'
installroot: '/'
state: removed
register: yum_result
# Seems like some yum versions won't download a package from local file repository, continue to use sos for this test.
# https://stackoverflow.com/questions/58295660/yum-downloadonly-ignores-packages-in-local-repo
- name: Test download_only
yum:
name: sos
@ -452,11 +454,11 @@
yum:
name:
- "@Custom Group"
- sos
- '{{ package2 }}'
state: present
register: yum_result
- name: verify sos is installed
- name: verify {{ package3 }} is installed
assert:
that:
- "yum_result is success"
@ -769,69 +771,69 @@
- "'lohit-*-fonts is not installed' in remove_lohit_fonts_2['results']"
- block:
- name: uninstall bc
yum: name=bc state=removed
- name: uninstall {{ package2 }}
yum: name={{ package2 }} state=removed
- name: check bc with rpm
shell: rpm -q bc
- name: check {{ package2 }} with rpm
shell: rpm -q {{ package2 }}
ignore_errors: True
register: rpm_bc_result
register: rpm_package2_result
- name: verify bc is uninstalled
- name: verify {{ package2 }} is uninstalled
assert:
that:
- "rpm_bc_result is failed"
- "rpm_package2_result is failed"
- name: exclude bc (yum backend)
- name: exclude {{ package2 }} (yum backend)
lineinfile:
dest: /etc/yum.conf
regexp: (^exclude=)(.)*
line: "exclude=bc*"
line: "exclude={{ package2 }}*"
state: present
when: ansible_pkg_mgr == 'yum'
- name: exclude bc (dnf backend)
- name: exclude {{ package2 }} (dnf backend)
lineinfile:
dest: /etc/dnf/dnf.conf
regexp: (^excludepkgs=)(.)*
line: "excludepkgs=bc*"
line: "excludepkgs={{ package2 }}*"
state: present
when: ansible_pkg_mgr == 'dnf'
# begin test case where disable_excludes is supported
- name: Try install bc without disable_excludes
yum: name=bc state=latest
register: yum_bc_result
- name: Try install {{ package2 }} without disable_excludes
yum: name={{ package2 }} state=latest
register: yum_package2_result
ignore_errors: True
- name: verify bc did not install because it is in exclude list
- name: verify {{ package2 }} did not install because it is in exclude list
assert:
that:
- "yum_bc_result is failed"
- "yum_package2_result is failed"
- name: install bc with disable_excludes
yum: name=bc state=latest disable_excludes=all
register: yum_bc_result_using_excludes
- name: install {{ package2 }} with disable_excludes
yum: name={{ package2 }} state=latest disable_excludes=all
register: yum_package2_result_using_excludes
- name: verify bc did install using disable_excludes=all
- name: verify {{ package2 }} did install using disable_excludes=all
assert:
that:
- "yum_bc_result_using_excludes is success"
- "yum_bc_result_using_excludes is changed"
- "yum_bc_result_using_excludes is not failed"
- "yum_package2_result_using_excludes is success"
- "yum_package2_result_using_excludes is changed"
- "yum_package2_result_using_excludes is not failed"
- name: remove exclude bc (cleanup yum.conf)
- name: remove exclude {{ package2 }} (cleanup yum.conf)
lineinfile:
dest: /etc/yum.conf
regexp: (^exclude=bc*)
regexp: (^exclude={{ package2 }}*)
line: "exclude="
state: present
when: ansible_pkg_mgr == 'yum'
- name: remove exclude bc (cleanup dnf.conf)
- name: remove exclude {{ package2 }} (cleanup dnf.conf)
lineinfile:
dest: /etc/dnf/dnf.conf
regexp: (^excludepkgs=bc*)
regexp: (^excludepkgs={{ package2 }}*)
line: "excludepkgs="
state: present
when: ansible_pkg_mgr == 'dnf'

View file

@ -4,6 +4,7 @@ osx/10.11 python=2.7 python_dir=/usr/local/bin
macos/10.15 python=3.8 python_dir=/usr/local/bin
rhel/7.6 python=2.7
rhel/7.8 python=2.7
rhel/7.9 python=2.7
rhel/8.1 python=3.6
rhel/8.2 python=3.6
aix/7.2 python=2.7 httptester=disabled temp-unicode=disabled pip-check=disabled