mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
[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:
@@ -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)
|
# 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
|
# 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
|
- name: Run android_sdk tests
|
||||||
environment:
|
environment:
|
||||||
PATH: '{{ ansible_facts.env.PATH }}:{{ android_sdk_location }}/cmdline-tools/latest/bin'
|
PATH: '{{ ansible_facts.env.PATH }}:{{ android_sdk_location }}/cmdline-tools/latest/bin'
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
assert:
|
assert:
|
||||||
that: modules_before.stdout == modules_after.stdout
|
that: modules_before.stdout == modules_after.stdout
|
||||||
when: ansible_facts.os_family in ['Debian', 'Suse']
|
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
|
- name: include misleading warning test
|
||||||
include_tasks: 635-apache2-misleading-warning.yml
|
include_tasks: 635-apache2-misleading-warning.yml
|
||||||
when: ansible_facts.os_family in ['Debian']
|
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
|
||||||
|
|||||||
@@ -13,8 +13,6 @@
|
|||||||
when:
|
when:
|
||||||
- ansible_facts.system != 'FreeBSD'
|
- ansible_facts.system != 'FreeBSD'
|
||||||
- ansible_facts.distribution != 'MacOSX'
|
- 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', '>=')
|
- ansible_facts.distribution != 'Ubuntu' or ansible_facts.distribution_version is version('18', '>=')
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
@@ -38,5 +36,3 @@
|
|||||||
command: /tmp/sh.rustup.rs -y
|
command: /tmp/sh.rustup.rs -y
|
||||||
- set_fact:
|
- set_fact:
|
||||||
rustup_cargo_bin: "{{ lookup('env', 'HOME') }}/.cargo/bin/cargo"
|
rustup_cargo_bin: "{{ lookup('env', 'HOME') }}/.cargo/bin/cargo"
|
||||||
when:
|
|
||||||
- ansible_facts.distribution != 'CentOS' or ansible_facts.distribution_version is version('7.0', '>=')
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
when:
|
when:
|
||||||
- not (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version|int == 14)
|
- 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.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 == '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 == '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
|
- 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
|
||||||
|
|||||||
@@ -170,10 +170,7 @@ cmd_echo_tests:
|
|||||||
# this will not be in the regular set of paths get_bin_path() searches
|
# this will not be in the regular set of paths get_bin_path() searches
|
||||||
- name: use cmd {{ remote_tmp_dir }}/echo
|
- name: use cmd {{ remote_tmp_dir }}/echo
|
||||||
condition: >
|
condition: >
|
||||||
{{
|
{{ ansible_facts.distribution != "MacOSX" }}
|
||||||
ansible_facts.distribution != "MacOSX" and
|
|
||||||
not (ansible_facts.distribution == "CentOS" and ansible_facts.distribution_major_version is version('7.0', '<'))
|
|
||||||
}}
|
|
||||||
copy_to: "{{ remote_tmp_dir }}"
|
copy_to: "{{ remote_tmp_dir }}"
|
||||||
cmd: "{{ remote_tmp_dir }}/echo"
|
cmd: "{{ remote_tmp_dir }}/echo"
|
||||||
arg_formats:
|
arg_formats:
|
||||||
@@ -195,10 +192,7 @@ cmd_echo_tests:
|
|||||||
- name: use cmd echo with path_prefix {{ remote_tmp_dir }}
|
- name: use cmd echo with path_prefix {{ remote_tmp_dir }}
|
||||||
cmd: echo
|
cmd: echo
|
||||||
condition: >
|
condition: >
|
||||||
{{
|
{{ ansible_facts.distribution != "MacOSX" }}
|
||||||
ansible_facts.distribution != "MacOSX" and
|
|
||||||
not (ansible_facts.distribution == "CentOS" and ansible_facts.distribution_major_version is version('7.0', '<'))
|
|
||||||
}}
|
|
||||||
copy_to: "{{ remote_tmp_dir }}"
|
copy_to: "{{ remote_tmp_dir }}"
|
||||||
path_prefix: "{{ remote_tmp_dir }}"
|
path_prefix: "{{ remote_tmp_dir }}"
|
||||||
arg_formats:
|
arg_formats:
|
||||||
|
|||||||
@@ -39,20 +39,7 @@
|
|||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
# selectattr not available on Jinja 2.2 provided by CentOS 6
|
- (result['sessions'] | selectattr('ID', 'match', '^' ~ session_id ~ '$') | first)['Name'] == 'testsession'
|
||||||
# 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)
|
|
||||||
|
|
||||||
- name: fetch info about a session
|
- name: fetch info about a session
|
||||||
consul_session:
|
consul_session:
|
||||||
@@ -93,21 +80,7 @@
|
|||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
# selectattr and equalto not available on Jinja 2.2 provided by CentOS 6
|
- (result['sessions'] | selectattr('ID', 'equalto', session_id) | list | length) == 0
|
||||||
# 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
|
|
||||||
|
|
||||||
- name: ensure session can be created with a ttl
|
- name: ensure session can be created with a ttl
|
||||||
consul_session:
|
consul_session:
|
||||||
|
|||||||
@@ -14,13 +14,6 @@
|
|||||||
consul_uri: https://releases.hashicorp.com/consul/{{ consul_version }}/consul_{{ consul_version }}_{{ ansible_facts.system | lower }}_{{ consul_arch }}.zip
|
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'
|
consul_cmd: '{{ remote_tmp_dir }}/consul'
|
||||||
block:
|
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
|
- name: Install py-consul
|
||||||
pip:
|
pip:
|
||||||
name: py-consul
|
name: py-consul
|
||||||
|
|||||||
@@ -5,10 +5,7 @@
|
|||||||
|
|
||||||
- name: bail out for non-supported platforms
|
- name: bail out for non-supported platforms
|
||||||
meta: end_play
|
meta: end_play
|
||||||
when:
|
when: ansible_facts.os_family != 'Debian'
|
||||||
- (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"
|
|
||||||
|
|
||||||
- name: install perl development package for Red Hat family
|
- name: install perl development package for Red Hat family
|
||||||
package:
|
package:
|
||||||
|
|||||||
@@ -7,6 +7,5 @@
|
|||||||
- include_tasks: install.yml
|
- include_tasks: install.yml
|
||||||
- include_tasks: lock_bash.yml
|
- include_tasks: lock_bash.yml
|
||||||
- include_tasks: lock_updates.yml
|
- include_tasks: lock_updates.yml
|
||||||
when: (ansible_facts.distribution == 'Fedora' and ansible_facts.distribution_major_version is version('23', '>=')) or
|
when: ansible_facts.os_family == 'RedHat'
|
||||||
(ansible_facts.distribution in ['RedHat', 'CentOS'] and ansible_facts.distribution_major_version is version('8', '>='))
|
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -52,8 +52,7 @@
|
|||||||
- 'ansible_facts.distribution == "Archlinux" and item.0.key == "bcachefs"'
|
- 'ansible_facts.distribution == "Archlinux" and item.0.key == "bcachefs"'
|
||||||
# f2fs-tools and reiserfs-utils packages not available with RHEL/CentOS on CI
|
# 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.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
|
- 'not (ansible_facts.os_family == "RedHat" and item.0.key == "btrfs")'
|
||||||
item.0.key == "btrfs")'
|
|
||||||
# reiserfs-utils package not available with Fedora 35 on CI
|
# reiserfs-utils package not available with Fedora 35 on CI
|
||||||
- 'not (ansible_facts.distribution == "Fedora" and (ansible_facts.distribution_major_version | int >= 35) and
|
- 'not (ansible_facts.distribution == "Fedora" and (ansible_facts.distribution_major_version | int >= 35) and
|
||||||
item.0.key == "reiserfs")'
|
item.0.key == "reiserfs")'
|
||||||
@@ -75,12 +74,6 @@
|
|||||||
# btrfs-progs cannot be installed on ArchLinux
|
# 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!
|
- '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
|
# TODO: something seems to be broken on Alpine
|
||||||
- 'not (ansible_facts.distribution == "Alpine")'
|
- 'not (ansible_facts.distribution == "Alpine")'
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
when:
|
when:
|
||||||
- ansible_facts.system == 'Linux'
|
- ansible_facts.system == 'Linux'
|
||||||
- ansible_facts.os_family != 'Suse'
|
- 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'
|
- ansible_facts.os_family != 'Alpine'
|
||||||
block:
|
block:
|
||||||
- name: "Install fatresize"
|
- name: "Install fatresize"
|
||||||
|
|||||||
@@ -19,13 +19,6 @@
|
|||||||
when:
|
when:
|
||||||
- ansible_facts.distribution == 'Fedora' and ansible_facts.distribution_major_version is version('43', '==')
|
- 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
|
- name: Install 7zip
|
||||||
import_tasks: 7zip.yml
|
import_tasks: 7zip.yml
|
||||||
|
|
||||||
|
|||||||
@@ -48,12 +48,6 @@
|
|||||||
src: httpd_echo.py
|
src: httpd_echo.py
|
||||||
dest: "{{ process_file }}"
|
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
|
- name: Install virtualenv on Arch Linux
|
||||||
pip:
|
pip:
|
||||||
name: virtualenv
|
name: virtualenv
|
||||||
|
|||||||
@@ -6,9 +6,8 @@
|
|||||||
- name: Skip unsupported platforms
|
- name: Skip unsupported platforms
|
||||||
meta: end_play
|
meta: end_play
|
||||||
# TODO: figure out why Alpine does not work!
|
# TODO: figure out why Alpine does not work!
|
||||||
when: |
|
when:
|
||||||
ansible_facts.distribution == 'CentOS' and ansible_facts.distribution_major_version is not version('7', '>=')
|
- ansible_facts.distribution == 'Alpine'
|
||||||
or ansible_facts.distribution == 'Alpine'
|
|
||||||
|
|
||||||
- name: Install Nomad and test
|
- name: Install Nomad and test
|
||||||
vars:
|
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_uri: https://releases.hashicorp.com/nomad/{{ nomad_version }}/nomad_{{ nomad_version }}_{{ ansible_facts.system | lower }}_{{ nomad_arch }}.zip
|
||||||
nomad_cmd: '{{ remote_tmp_dir }}/nomad'
|
nomad_cmd: '{{ remote_tmp_dir }}/nomad'
|
||||||
block:
|
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
|
- name: Install python-nomad
|
||||||
pip:
|
pip:
|
||||||
name: python-nomad
|
name: python-nomad
|
||||||
|
|||||||
Reference in New Issue
Block a user