[PR #11719/66886d08 backport][stable-12] integration tests: remove CentOS conditionals - part 2 (#11730)

integration tests: remove CentOS conditionals - part 2 (#11719)

* test(integration): remove CentOS references - part 2

* adjustments from review

(cherry picked from commit 66886d08f5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot]
2026-04-03 12:34:15 +00:00
committed by GitHub
parent f77d731faf
commit fa9ac2b3a9
14 changed files with 12 additions and 97 deletions

View File

@@ -8,12 +8,6 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# java >= 17 is not available in RHEL and CentOS7 repos, which is required for sdkmanager to run
- name: Bail out if not supported
when:
- "ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_version is version('8.0', '<')"
ansible.builtin.meta: end_play
- name: Run android_sdk tests
environment:
PATH: '{{ ansible_facts.env.PATH }}:{{ android_sdk_location }}/cmdline-tools/latest/bin'

View File

@@ -29,9 +29,9 @@
assert:
that: modules_before.stdout == modules_after.stdout
when: ansible_facts.os_family in ['Debian', 'Suse']
# centos/RHEL does not have a2enmod/a2dismod
# CentOS/RHEL does not have a2enmod/a2dismod
- name: include misleading warning test
include_tasks: 635-apache2-misleading-warning.yml
when: ansible_facts.os_family in ['Debian']
# Suse has mpm_event module compiled within the base apache2
# Suse has mpm_event module compiled within the base apache2

View File

@@ -13,8 +13,6 @@
when:
- ansible_facts.system != 'FreeBSD'
- ansible_facts.distribution != 'MacOSX'
- ansible_facts.distribution != 'RedHat' or ansible_facts.distribution_version is version('8.0', '>=')
- ansible_facts.distribution != 'CentOS' or ansible_facts.distribution_version is version('7.0', '>=')
- ansible_facts.distribution != 'Ubuntu' or ansible_facts.distribution_version is version('18', '>=')
- block:
@@ -38,5 +36,3 @@
command: /tmp/sh.rustup.rs -y
- set_fact:
rustup_cargo_bin: "{{ lookup('env', 'HOME') }}/.cargo/bin/cargo"
when:
- ansible_facts.distribution != 'CentOS' or ansible_facts.distribution_version is version('7.0', '>=')

View File

@@ -25,7 +25,6 @@
when:
- not (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version|int == 14)
- not (ansible_facts.os_family == "Suse" and ansible_facts.distribution_major_version|int == 15)
- not (ansible_facts.distribution == "CentOS" and ansible_facts.distribution_major_version|int == 8) # TODO: cannot start service
- not (ansible_facts.distribution == 'Archlinux') # TODO: package seems to be broken, cannot be downloaded from mirrors?
- not (ansible_facts.distribution == 'Alpine') # TODO: not sure what's wrong here, the module doesn't return what the tests expect
- not (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version|int == 13) # TODO: not sure what's wrong here, the module doesn't return what the tests expect

View File

@@ -170,10 +170,7 @@ cmd_echo_tests:
# this will not be in the regular set of paths get_bin_path() searches
- name: use cmd {{ remote_tmp_dir }}/echo
condition: >
{{
ansible_facts.distribution != "MacOSX" and
not (ansible_facts.distribution == "CentOS" and ansible_facts.distribution_major_version is version('7.0', '<'))
}}
{{ ansible_facts.distribution != "MacOSX" }}
copy_to: "{{ remote_tmp_dir }}"
cmd: "{{ remote_tmp_dir }}/echo"
arg_formats:
@@ -195,10 +192,7 @@ cmd_echo_tests:
- name: use cmd echo with path_prefix {{ remote_tmp_dir }}
cmd: echo
condition: >
{{
ansible_facts.distribution != "MacOSX" and
not (ansible_facts.distribution == "CentOS" and ansible_facts.distribution_major_version is version('7.0', '<'))
}}
{{ ansible_facts.distribution != "MacOSX" }}
copy_to: "{{ remote_tmp_dir }}"
path_prefix: "{{ remote_tmp_dir }}"
arg_formats:

View File

@@ -39,20 +39,7 @@
- assert:
that:
- result is changed
# selectattr not available on Jinja 2.2 provided by CentOS 6
# hence the two following tasks (set_fact/assert) are used
# - (result['sessions'] | selectattr('ID', 'match', '^' ~ session_id ~ '$') | first)['Name'] == 'testsession'
- name: search created session
set_fact:
test_session_found: true
loop: "{{ result['sessions'] }}"
when: "item.get('ID') == session_id and item.get('Name') == 'testsession'"
- name: ensure session was created
assert:
that:
- test_session_found|default(false)
- (result['sessions'] | selectattr('ID', 'match', '^' ~ session_id ~ '$') | first)['Name'] == 'testsession'
- name: fetch info about a session
consul_session:
@@ -93,21 +80,7 @@
- assert:
that:
- result is changed
# selectattr and equalto not available on Jinja 2.2 provided by CentOS 6
# hence the two following tasks (command/assert) are used
# - (result['sessions'] | selectattr('ID', 'equalto', session_id) | list | length) == 0
- name: search deleted session
command: echo 'session found'
loop: "{{ result['sessions'] }}"
when: "item.get('ID') == session_id and item.get('Name') == 'testsession'"
register: search_deleted
- name: ensure session was deleted
assert:
that:
- search_deleted is skipped # each iteration is skipped
- search_deleted is not changed # and then unchanged
- (result['sessions'] | selectattr('ID', 'equalto', session_id) | list | length) == 0
- name: ensure session can be created with a ttl
consul_session:

View File

@@ -14,13 +14,6 @@
consul_uri: https://releases.hashicorp.com/consul/{{ consul_version }}/consul_{{ consul_version }}_{{ ansible_facts.system | lower }}_{{ consul_arch }}.zip
consul_cmd: '{{ remote_tmp_dir }}/consul'
block:
- name: Install requests<2.20 (CentOS/RHEL 6)
pip:
name: requests<2.20
extra_args: "-c {{ remote_constraints }}"
register: result
until: result is success
when: ansible_facts.distribution_file_variety|default() == 'RedHat' and ansible_facts.distribution_major_version is version('6', '<=')
- name: Install py-consul
pip:
name: py-consul

View File

@@ -5,10 +5,7 @@
- name: bail out for non-supported platforms
meta: end_play
when:
- (ansible_facts.os_family != "RedHat" or ansible_facts.distribution_major_version|int < 8) # TODO: bump back to 7
- (ansible_facts.distribution != 'CentOS' or ansible_facts.distribution_major_version|int < 8) # TODO: remove
- ansible_facts.os_family != "Debian"
when: ansible_facts.os_family != 'Debian'
- name: install perl development package for Red Hat family
package:

View File

@@ -7,6 +7,5 @@
- include_tasks: install.yml
- include_tasks: lock_bash.yml
- include_tasks: lock_updates.yml
when: (ansible_facts.distribution == 'Fedora' and ansible_facts.distribution_major_version is version('23', '>=')) or
(ansible_facts.distribution in ['RedHat', 'CentOS'] and ansible_facts.distribution_major_version is version('8', '>='))
when: ansible_facts.os_family == 'RedHat'
...

View File

@@ -52,8 +52,7 @@
- 'ansible_facts.distribution == "Archlinux" and item.0.key == "bcachefs"'
# f2fs-tools and reiserfs-utils packages not available with RHEL/CentOS on CI
- 'not (ansible_facts.distribution in ["CentOS", "RedHat"] and item.0.key in ["f2fs", "reiserfs"])'
- 'not (ansible_facts.os_family == "RedHat" and ansible_facts.distribution_major_version is version("8", ">=") and
item.0.key == "btrfs")'
- 'not (ansible_facts.os_family == "RedHat" and item.0.key == "btrfs")'
# reiserfs-utils package not available with Fedora 35 on CI
- 'not (ansible_facts.distribution == "Fedora" and (ansible_facts.distribution_major_version | int >= 35) and
item.0.key == "reiserfs")'
@@ -75,12 +74,6 @@
# btrfs-progs cannot be installed on ArchLinux
- 'not (item.0.key == "btrfs" and ansible_facts.distribution == "Archlinux")' # TODO: figure out why it fails, fix it!
# On CentOS 6 shippable containers, wipefs seems unable to remove vfat signatures
- 'not (ansible_facts.distribution == "CentOS" and ansible_facts.distribution_version is version("7.0", "<") and
item.1 == "remove_fs" and item.0.key == "vfat")'
# On same systems, mkfs.minix (unhandled by the module) can't find the device/file
- 'not (ansible_facts.distribution == "CentOS" and ansible_facts.distribution_version is version("7.0", "<") and
item.1 == "overwrite_another_fs")'
# TODO: something seems to be broken on Alpine
- 'not (ansible_facts.distribution == "Alpine")'

View File

@@ -123,7 +123,7 @@
when:
- ansible_facts.system == 'Linux'
- ansible_facts.os_family != 'Suse'
- ansible_facts.os_family != 'RedHat' or (ansible_facts.distribution == 'CentOS' and ansible_facts.distribution_version is version('7.0', '=='))
- ansible_facts.os_family != 'RedHat'
- ansible_facts.os_family != 'Alpine'
block:
- name: "Install fatresize"

View File

@@ -19,13 +19,6 @@
when:
- ansible_facts.distribution == 'Fedora' and ansible_facts.distribution_major_version is version('43', '==')
- name: Install EPEL repository (RHEL only)
include_role:
name: setup_epel
when:
- ansible_facts.distribution in ['RedHat', 'CentOS']
- ansible_facts.distribution_major_version is version('9', '<')
- name: Install 7zip
import_tasks: 7zip.yml

View File

@@ -48,12 +48,6 @@
src: httpd_echo.py
dest: "{{ process_file }}"
- name: Install virtualenv on CentOS 8
package:
name: virtualenv
state: present
when: ansible_facts.distribution == 'CentOS' and ansible_facts.distribution_major_version == '8'
- name: Install virtualenv on Arch Linux
pip:
name: virtualenv

View File

@@ -6,9 +6,8 @@
- name: Skip unsupported platforms
meta: end_play
# TODO: figure out why Alpine does not work!
when: |
ansible_facts.distribution == 'CentOS' and ansible_facts.distribution_major_version is not version('7', '>=')
or ansible_facts.distribution == 'Alpine'
when:
- ansible_facts.distribution == 'Alpine'
- name: Install Nomad and test
vars:
@@ -16,15 +15,6 @@
nomad_uri: https://releases.hashicorp.com/nomad/{{ nomad_version }}/nomad_{{ nomad_version }}_{{ ansible_facts.system | lower }}_{{ nomad_arch }}.zip
nomad_cmd: '{{ remote_tmp_dir }}/nomad'
block:
- name: Install requests<2.20 (CentOS/RHEL 6)
pip:
name: requests<2.20
extra_args: "-c {{ remote_constraints }}"
register: result
until: result is success
when: ansible_facts.distribution_file_variety|default() == 'RedHat' and ansible_facts.distribution_major_version is version('6', '<=')
- name: Install python-nomad
pip:
name: python-nomad