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=windows/2019/1
- env: T=macos/10.15/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=rhel/8.2/1
- env: T=freebsd/11.1/1 - env: T=freebsd/11.1/1
- env: T=freebsd/12.1/1 - env: T=freebsd/12.1/1
@ -43,7 +43,7 @@ matrix:
- env: T=linux/ubuntu1804/1 - env: T=linux/ubuntu1804/1
- env: T=macos/10.15/2 - 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=rhel/8.2/2
- env: T=freebsd/11.1/2 - env: T=freebsd/11.1/2
- env: T=freebsd/12.1/2 - env: T=freebsd/12.1/2
@ -58,7 +58,7 @@ matrix:
- env: T=linux/ubuntu1804/2 - env: T=linux/ubuntu1804/2
- env: T=macos/10.15/3 - 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=rhel/8.2/3
- env: T=freebsd/11.1/3 - env: T=freebsd/11.1/3
- env: T=freebsd/12.1/3 - env: T=freebsd/12.1/3
@ -73,7 +73,7 @@ matrix:
- env: T=linux/ubuntu1804/3 - env: T=linux/ubuntu1804/3
- env: T=macos/10.15/4 - 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=rhel/8.2/4
- env: T=freebsd/11.1/4 - env: T=freebsd/11.1/4
- env: T=freebsd/12.1/4 - env: T=freebsd/12.1/4
@ -88,7 +88,7 @@ matrix:
- env: T=linux/ubuntu1804/4 - env: T=linux/ubuntu1804/4
- env: T=macos/10.15/5 - 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=rhel/8.2/5
- env: T=freebsd/11.1/5 - env: T=freebsd/11.1/5
- env: T=freebsd/12.1/5 - env: T=freebsd/12.1/5
@ -109,7 +109,7 @@ matrix:
- env: T=generic/3.6/1 - env: T=generic/3.6/1
- env: T=i/osx/10.11 - 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/rhel/8.2
- env: T=i/freebsd/11.1 - env: T=i/freebsd/11.1
- env: T=i/freebsd/12.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 # 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. # We want to test that for people who don't want to upgrade their systems.
- block: - block:
- name: ensure test packages are removed before starting
yum:
name:
- sos
state: absent
- import_tasks: yum.yml - import_tasks: yum.yml
always: always:
- name: remove installed packages - name: remove installed packages
yum: yum:
name: name:
- bc
- sos - sos
state: absent state: absent

View file

@ -1,22 +1,27 @@
# Setup by setup_rpm_repo
- set_fact:
package1: dinginessentail
package2: dinginessentail-olive
# UNINSTALL # UNINSTALL
- name: uninstall sos - name: uninstall {{ package1 }}
yum: name=sos state=removed yum: name={{ package1 }} state=removed
register: yum_result register: yum_result
- name: check sos with rpm - name: check {{ package1 }} with rpm
shell: rpm -q sos shell: rpm -q {{ package1 }}
ignore_errors: True ignore_errors: True
register: rpm_result register: rpm_result
- name: verify uninstallation of sos - name: verify uninstallation of {{ package1 }}
assert: assert:
that: that:
- "yum_result is success" - "yum_result is success"
- "rpm_result is failed" - "rpm_result is failed"
# UNINSTALL AGAIN # UNINSTALL AGAIN
- name: uninstall sos again in check mode - name: uninstall {{ package1 }} again in check mode
yum: name=sos state=removed yum: name={{ package1 }} state=removed
check_mode: true check_mode: true
register: yum_result register: yum_result
@ -25,8 +30,8 @@
that: that:
- "not yum_result is changed" - "not yum_result is changed"
- name: uninstall sos again - name: uninstall {{ package1 }} again
yum: name=sos state=removed yum: name={{ package1 }} state=removed
register: yum_result register: yum_result
- name: verify no change on re-uninstall - name: verify no change on re-uninstall
@ -35,21 +40,21 @@
- "not yum_result is changed" - "not yum_result is changed"
# INSTALL # INSTALL
- name: install sos in check mode - name: install {{ package1 }} in check mode
yum: name=sos state=present yum: name={{ package1 }} state=present
check_mode: true check_mode: true
register: yum_result register: yum_result
- name: verify installation of sos in check mode - name: verify installation of {{ package1 }} in check mode
assert: assert:
that: that:
- "yum_result is changed" - "yum_result is changed"
- name: install sos - name: install {{ package1 }}
yum: name=sos state=present yum: name={{ package1 }} state=present
register: yum_result register: yum_result
- name: verify installation of sos - name: verify installation of {{ package1 }}
assert: assert:
that: that:
- "yum_result is success" - "yum_result is success"
@ -62,12 +67,12 @@
- "'msg' in yum_result" - "'msg' in yum_result"
- "'results' in yum_result" - "'results' in yum_result"
- name: check sos with rpm - name: check {{ package1 }} with rpm
shell: rpm -q sos shell: rpm -q {{ package1 }}
# INSTALL AGAIN # INSTALL AGAIN
- name: install sos again in check mode - name: install {{ package1 }} again in check mode
yum: name=sos state=present yum: name={{ package1 }} state=present
check_mode: true check_mode: true
register: yum_result register: yum_result
- name: verify no change on second install in check mode - name: verify no change on second install in check mode
@ -75,16 +80,16 @@
that: that:
- "not yum_result is changed" - "not yum_result is changed"
- name: install sos again - name: install {{ package1 }} again
yum: name=sos state=present yum: name={{ package1 }} state=present
register: yum_result register: yum_result
- name: verify no change on second install - name: verify no change on second install
assert: assert:
that: that:
- "not yum_result is changed" - "not yum_result is changed"
- name: install sos again with empty string enablerepo - name: install {{ package1 }} again with empty string enablerepo
yum: name=sos state=present enablerepo="" yum: name={{ package1 }} state=present enablerepo=""
register: yum_result register: yum_result
- name: verify no change on third install with empty string enablerepo - name: verify no change on third install with empty string enablerepo
assert: assert:
@ -94,14 +99,11 @@
# This test case is unfortunately distro specific because we have to specify # 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 # 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: yum:
name: sos name: '{{ package1 }}'
state: present state: present
enablerepo: enablerepo: '{{ repos + ["thisrepodoesnotexist"] }}'
- "thisrepodoesnotexist"
- "base"
- "updates"
disablerepo: "*" disablerepo: "*"
register: yum_result register: yum_result
when: ansible_distribution == 'CentOS' when: ansible_distribution == 'CentOS'
@ -114,13 +116,11 @@
# This test case is unfortunately distro specific because we have to specify # 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 # 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: yum:
name: sos name: '{{ package1 }}'
state: present state: present
enablerepo: enablerepo: '{{ repos }}'
- "base"
- "updates"
disablerepo: "*" disablerepo: "*"
register: yum_result register: yum_result
when: ansible_distribution == 'CentOS' when: ansible_distribution == 'CentOS'
@ -131,9 +131,9 @@
- "yum_result is not changed" - "yum_result is not changed"
when: ansible_distribution == 'CentOS' when: ansible_distribution == 'CentOS'
- name: install sos again with only missing repo enablerepo - name: install {{ package1 }} again with only missing repo enablerepo
yum: yum:
name: sos name: '{{ package1 }}'
state: present state: present
enablerepo: "thisrepodoesnotexist" enablerepo: "thisrepodoesnotexist"
ignore_errors: true ignore_errors: true
@ -150,28 +150,28 @@
when: ansible_pkg_mgr == 'dnf' when: ansible_pkg_mgr == 'dnf'
# INSTALL AGAIN WITH LATEST # INSTALL AGAIN WITH LATEST
- name: install sos again with state latest in check mode - name: install {{ package1 }} again with state latest in check mode
yum: name=sos state=latest yum: name={{ package1 }} state=latest
check_mode: true check_mode: true
register: yum_result 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: assert:
that: that:
- "not yum_result is changed" - "not yum_result is changed"
- name: install sos again with state latest idempotence - name: install {{ package1 }} again with state latest idempotence
yum: name=sos state=latest yum: name={{ package1 }} state=latest
register: yum_result register: yum_result
- name: verify install sos again with state latest idempotence - name: verify install {{ package1 }} again with state latest idempotence
assert: assert:
that: that:
- "not yum_result is changed" - "not yum_result is changed"
# INSTALL WITH LATEST # INSTALL WITH LATEST
- name: uninstall sos - name: uninstall {{ package1 }}
yum: name=sos state=removed yum: name={{ package1 }} state=removed
register: yum_result register: yum_result
- name: verify uninstall sos - name: verify uninstall {{ package1 }}
assert: assert:
that: that:
- "yum_result is successful" - "yum_result is successful"
@ -184,11 +184,11 @@
register: yum_conf_copy register: yum_conf_copy
- block: - block:
- name: install sos with state latest in check mode with config file param - name: install {{ package1 }} with state latest in check mode with config file param
yum: name=sos state=latest conf_file=/etc/yum.conf yum: name={{ package1 }} state=latest conf_file=/etc/yum.conf
check_mode: true check_mode: true
register: yum_result 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: assert:
that: that:
- "yum_result is changed" - "yum_result is changed"
@ -200,62 +200,62 @@
state: absent state: absent
when: yum_conf_copy is changed when: yum_conf_copy is changed
- name: install sos with state latest in check mode - name: install {{ package1 }} with state latest in check mode
yum: name=sos state=latest yum: name={{ package1 }} state=latest
check_mode: true check_mode: true
register: yum_result register: yum_result
- name: verify install sos with state latest in check mode - name: verify install {{ package1 }} with state latest in check mode
assert: assert:
that: that:
- "yum_result is changed" - "yum_result is changed"
- name: install sos with state latest - name: install {{ package1 }} with state latest
yum: name=sos state=latest yum: name={{ package1 }} state=latest
register: yum_result register: yum_result
- name: verify install sos with state latest - name: verify install {{ package1 }} with state latest
assert: assert:
that: that:
- "yum_result is changed" - "yum_result is changed"
- name: install sos with state latest idempotence - name: install {{ package1 }} with state latest idempotence
yum: name=sos state=latest yum: name={{ package1 }} state=latest
register: yum_result register: yum_result
- name: verify install sos with state latest idempotence - name: verify install {{ package1 }} with state latest idempotence
assert: assert:
that: that:
- "not yum_result is changed" - "not yum_result is changed"
- name: install sos with state latest idempotence with config file param - name: install {{ package1 }} with state latest idempotence with config file param
yum: name=sos state=latest yum: name={{ package1 }} state=latest
register: yum_result 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: assert:
that: that:
- "not yum_result is changed" - "not yum_result is changed"
# Multiple packages # Multiple packages
- name: uninstall sos and bc - name: uninstall {{ package1 }} and {{ package2 }}
yum: name=sos,bc state=removed yum: name={{ package1 }},{{ package2 }} state=removed
- name: check sos with rpm - name: check {{ package1 }} with rpm
shell: rpm -q sos shell: rpm -q {{ package1 }}
ignore_errors: True ignore_errors: True
register: rpm_sos_result register: rpm_package1_result
- name: check bc with rpm - name: check {{ package2 }} with rpm
shell: rpm -q bc shell: rpm -q {{ package2 }}
ignore_errors: True ignore_errors: True
register: rpm_bc_result register: rpm_package2_result
- name: verify packages installed - name: verify packages installed
assert: assert:
that: that:
- "rpm_sos_result is failed" - "rpm_package1_result is failed"
- "rpm_bc_result is failed" - "rpm_package2_result is failed"
- name: install sos and bc as comma separated - name: install {{ package1 }} and {{ package2 }} as comma separated
yum: name=sos,bc state=present yum: name={{ package1 }},{{ package2 }} state=present
register: yum_result register: yum_result
- name: verify packages installed - name: verify packages installed
@ -264,21 +264,21 @@
- "yum_result is success" - "yum_result is success"
- "yum_result is changed" - "yum_result is changed"
- name: check sos with rpm - name: check {{ package1 }} with rpm
shell: rpm -q sos shell: rpm -q {{ package1 }}
- name: check bc with rpm - name: check {{ package2 }} with rpm
shell: rpm -q bc shell: rpm -q {{ package2 }}
- name: uninstall sos and bc - name: uninstall {{ package1 }} and {{ package2 }}
yum: name=sos,bc state=removed yum: name={{ package1 }},{{ package2 }} state=removed
register: yum_result register: yum_result
- name: install sos and bc as list - name: install {{ package1 }} and {{ package2 }} as list
yum: yum:
name: name:
- sos - '{{ package1 }}'
- bc - '{{ package2 }}'
state: present state: present
register: yum_result register: yum_result
@ -288,19 +288,19 @@
- "yum_result is success" - "yum_result is success"
- "yum_result is changed" - "yum_result is changed"
- name: check sos with rpm - name: check {{ package1 }} with rpm
shell: rpm -q sos shell: rpm -q {{ package1 }}
- name: check bc with rpm - name: check {{ package2 }} with rpm
shell: rpm -q bc shell: rpm -q {{ package2 }}
- name: uninstall sos and bc - name: uninstall {{ package1 }} and {{ package2 }}
yum: name=sos,bc state=removed yum: name={{ package1 }},{{ package2 }} state=removed
register: yum_result register: yum_result
- name: install sos and bc as comma separated with spaces - name: install {{ package1 }} and {{ package2 }} as comma separated with spaces
yum: yum:
name: "sos, bc" name: "{{ package1 }}, {{ package2 }}"
state: present state: present
register: yum_result register: yum_result
@ -310,14 +310,14 @@
- "yum_result is success" - "yum_result is success"
- "yum_result is changed" - "yum_result is changed"
- name: check sos with rpm - name: check {{ package1 }} with rpm
shell: rpm -q sos shell: rpm -q {{ package1 }}
- name: check bc with rpm - name: check {{ package2 }} with rpm
shell: rpm -q bc shell: rpm -q {{ package2 }}
- name: uninstall sos and bc - name: uninstall {{ package1 }} and {{ package2 }}
yum: name=sos,bc state=removed yum: name={{ package1 }},{{ package2 }} state=removed
- name: install non-existent rpm - name: install non-existent rpm
yum: yum:
@ -331,11 +331,11 @@
- non_existent_rpm is failed - non_existent_rpm is failed
# Install in installroot='/' # Install in installroot='/'
- name: install sos - name: install {{ package1 }}
yum: name=sos state=present installroot='/' yum: name={{ package1 }} state=present installroot='/'
register: yum_result register: yum_result
- name: verify installation of sos - name: verify installation of {{ package1 }}
assert: assert:
that: that:
- "yum_result is success" - "yum_result is success"
@ -348,16 +348,18 @@
- "'msg' in yum_result" - "'msg' in yum_result"
- "'results' in yum_result" - "'results' in yum_result"
- name: check sos with rpm - name: check {{ package1 }} with rpm
shell: rpm -q sos --root=/ shell: rpm -q {{ package1 }} --root=/
- name: uninstall sos - name: uninstall {{ package1 }}
yum: yum:
name: sos name: '{{ package1 }}'
installroot: '/' installroot: '/'
state: removed state: removed
register: yum_result 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 - name: Test download_only
yum: yum:
name: sos name: sos
@ -452,11 +454,11 @@
yum: yum:
name: name:
- "@Custom Group" - "@Custom Group"
- sos - '{{ package2 }}'
state: present state: present
register: yum_result register: yum_result
- name: verify sos is installed - name: verify {{ package3 }} is installed
assert: assert:
that: that:
- "yum_result is success" - "yum_result is success"
@ -769,69 +771,69 @@
- "'lohit-*-fonts is not installed' in remove_lohit_fonts_2['results']" - "'lohit-*-fonts is not installed' in remove_lohit_fonts_2['results']"
- block: - block:
- name: uninstall bc - name: uninstall {{ package2 }}
yum: name=bc state=removed yum: name={{ package2 }} state=removed
- name: check bc with rpm - name: check {{ package2 }} with rpm
shell: rpm -q bc shell: rpm -q {{ package2 }}
ignore_errors: True ignore_errors: True
register: rpm_bc_result register: rpm_package2_result
- name: verify bc is uninstalled - name: verify {{ package2 }} is uninstalled
assert: assert:
that: that:
- "rpm_bc_result is failed" - "rpm_package2_result is failed"
- name: exclude bc (yum backend) - name: exclude {{ package2 }} (yum backend)
lineinfile: lineinfile:
dest: /etc/yum.conf dest: /etc/yum.conf
regexp: (^exclude=)(.)* regexp: (^exclude=)(.)*
line: "exclude=bc*" line: "exclude={{ package2 }}*"
state: present state: present
when: ansible_pkg_mgr == 'yum' when: ansible_pkg_mgr == 'yum'
- name: exclude bc (dnf backend) - name: exclude {{ package2 }} (dnf backend)
lineinfile: lineinfile:
dest: /etc/dnf/dnf.conf dest: /etc/dnf/dnf.conf
regexp: (^excludepkgs=)(.)* regexp: (^excludepkgs=)(.)*
line: "excludepkgs=bc*" line: "excludepkgs={{ package2 }}*"
state: present state: present
when: ansible_pkg_mgr == 'dnf' when: ansible_pkg_mgr == 'dnf'
# begin test case where disable_excludes is supported # begin test case where disable_excludes is supported
- name: Try install bc without disable_excludes - name: Try install {{ package2 }} without disable_excludes
yum: name=bc state=latest yum: name={{ package2 }} state=latest
register: yum_bc_result register: yum_package2_result
ignore_errors: True 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: assert:
that: that:
- "yum_bc_result is failed" - "yum_package2_result is failed"
- name: install bc with disable_excludes - name: install {{ package2 }} with disable_excludes
yum: name=bc state=latest disable_excludes=all yum: name={{ package2 }} state=latest disable_excludes=all
register: yum_bc_result_using_excludes 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: assert:
that: that:
- "yum_bc_result_using_excludes is success" - "yum_package2_result_using_excludes is success"
- "yum_bc_result_using_excludes is changed" - "yum_package2_result_using_excludes is changed"
- "yum_bc_result_using_excludes is not failed" - "yum_package2_result_using_excludes is not failed"
- name: remove exclude bc (cleanup yum.conf) - name: remove exclude {{ package2 }} (cleanup yum.conf)
lineinfile: lineinfile:
dest: /etc/yum.conf dest: /etc/yum.conf
regexp: (^exclude=bc*) regexp: (^exclude={{ package2 }}*)
line: "exclude=" line: "exclude="
state: present state: present
when: ansible_pkg_mgr == 'yum' when: ansible_pkg_mgr == 'yum'
- name: remove exclude bc (cleanup dnf.conf) - name: remove exclude {{ package2 }} (cleanup dnf.conf)
lineinfile: lineinfile:
dest: /etc/dnf/dnf.conf dest: /etc/dnf/dnf.conf
regexp: (^excludepkgs=bc*) regexp: (^excludepkgs={{ package2 }}*)
line: "excludepkgs=" line: "excludepkgs="
state: present state: present
when: ansible_pkg_mgr == 'dnf' 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 macos/10.15 python=3.8 python_dir=/usr/local/bin
rhel/7.6 python=2.7 rhel/7.6 python=2.7
rhel/7.8 python=2.7 rhel/7.8 python=2.7
rhel/7.9 python=2.7
rhel/8.1 python=3.6 rhel/8.1 python=3.6
rhel/8.2 python=3.6 rhel/8.2 python=3.6
aix/7.2 python=2.7 httptester=disabled temp-unicode=disabled pip-check=disabled aix/7.2 python=2.7 httptester=disabled temp-unicode=disabled pip-check=disabled