mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-12 20:00:58 +00:00
integration tests: remove CentOS conditionals (#11715)
* test(integration): remove CentOS references * further simplification * more removals * rollback systemd_info for now * ufw: not trivially used with RHEL9 and RHEL10, simplifying tests * remove tasks for setup_epel where unused * adjustments from review
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
|
||||
- when:
|
||||
- ansible_facts.os_family != 'Archlinux' # TODO install driver from AUR: https://aur.archlinux.org/packages/psqlodbc
|
||||
- ansible_facts.os_family != 'RedHat' or ansible_facts.distribution_major_version != '7' # CentOS 7 stopped working
|
||||
- ansible_facts.distribution != 'Debian' or ansible_facts.distribution_major_version != '13' # TODO fix tests for Debian 13 (Trixie)!
|
||||
block:
|
||||
|
||||
|
||||
@@ -24,4 +24,4 @@
|
||||
with_items:
|
||||
- { node_version: 16.20.0, pnpm_version: 8.7.0 }
|
||||
when:
|
||||
- not(ansible_facts.distribution == 'Alpine') and not(ansible_facts.distribution == 'CentOS' and ansible_facts.distribution_major_version == '6')
|
||||
- ansible_facts.distribution != 'Alpine'
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# Copyright (c) Ansible Project
|
||||
# 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
|
||||
|
||||
needs/target/setup_epel
|
||||
@@ -12,13 +12,6 @@
|
||||
debug:
|
||||
msg: "Distribution '{{ ansible_facts.distribution }}', version '{{ ansible_facts.distribution_version }}', OS family '{{ ansible_facts.os_family }}'"
|
||||
|
||||
- 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: Distribution specific
|
||||
block:
|
||||
- name: Include distribution specific vars
|
||||
|
||||
@@ -9,11 +9,8 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
- set_fact:
|
||||
has_java_keytool: >-
|
||||
{{
|
||||
ansible_facts.os_family not in ['Darwin', 'FreeBSD']
|
||||
and not (ansible_facts.distribution == "CentOS" and ansible_facts.distribution_version is version("7.0", "<"))
|
||||
}}
|
||||
has_java_keytool: >
|
||||
{{ ansible_facts.os_family not in ['Darwin', 'FreeBSD'] }}
|
||||
|
||||
- name: Include OS-specific variables
|
||||
include_vars: '{{ lookup("first_found", params) }}'
|
||||
|
||||
@@ -27,20 +27,18 @@
|
||||
name: '{{ openssl_package_name }}'
|
||||
when: not ansible_facts.os_family == 'Darwin'
|
||||
|
||||
- when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
|
||||
block:
|
||||
- name: Install cryptography
|
||||
become: true
|
||||
package:
|
||||
name: '{{ cryptography_package_name_python3 }}'
|
||||
when: not cryptography_from_pip
|
||||
- name: Install cryptography
|
||||
become: true
|
||||
package:
|
||||
name: '{{ cryptography_package_name_python3 }}'
|
||||
when: not cryptography_from_pip
|
||||
|
||||
- name: Install cryptography (pip)
|
||||
become: true
|
||||
pip:
|
||||
name: cryptography>=3.3
|
||||
extra_args: "-c {{ remote_constraints }}"
|
||||
when: cryptography_from_pip
|
||||
- name: Install cryptography (pip)
|
||||
become: true
|
||||
pip:
|
||||
name: cryptography>=3.3
|
||||
extra_args: "-c {{ remote_constraints }}"
|
||||
when: cryptography_from_pip
|
||||
|
||||
- name: Install pyOpenSSL
|
||||
become: true
|
||||
|
||||
@@ -26,19 +26,6 @@
|
||||
cacheable: true
|
||||
when: ansible_facts.os_family == "Archlinux"
|
||||
|
||||
- shell:
|
||||
cmd: |
|
||||
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*.repo
|
||||
sed -i 's%#baseurl=http://mirror.centos.org/%baseurl=https://vault.centos.org/%g' /etc/yum.repos.d/*.repo
|
||||
when: ansible_facts.distribution in 'CentOS' and ansible_facts.distribution_major_version == '7'
|
||||
|
||||
- shell:
|
||||
cmd: |
|
||||
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*.repo
|
||||
sed -i 's%#baseurl=http://mirror.centos.org/$contentdir/$releasever/%baseurl=https://vault.centos.org/8.4.2105/%g' /etc/yum.repos.d/CentOS-Linux-*.repo
|
||||
ignore_errors: true # This fails for CentOS Stream 8
|
||||
when: ansible_facts.distribution in 'CentOS' and ansible_facts.distribution_major_version == '8'
|
||||
|
||||
- when: ansible_facts.os_family == "Archlinux"
|
||||
block:
|
||||
- name: ArchLinux specific setup
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# Copyright (c) Ansible Project
|
||||
# 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
|
||||
|
||||
needs/target/setup_epel
|
||||
@@ -12,13 +12,6 @@
|
||||
debug:
|
||||
msg: "Distribution '{{ ansible_facts.distribution }}', version '{{ ansible_facts.distribution_version }}', OS family '{{ ansible_facts.os_family }}'"
|
||||
|
||||
- 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: Include distribution specific tasks
|
||||
include_tasks: "{{ lookup('first_found', params) }}"
|
||||
vars:
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
|
||||
- name: Skip unsupported platforms
|
||||
meta: end_play
|
||||
when: (ansible_facts.distribution != 'CentOS') or
|
||||
(ansible_facts.distribution == 'CentOS' and ansible_facts.distribution_major_version is not version('7', '>='))
|
||||
# Not being effectively tested and bound to be removed in 14.0.0 with jboss module deprecation
|
||||
|
||||
- name: Install java
|
||||
package:
|
||||
|
||||
@@ -8,52 +8,46 @@
|
||||
# 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
|
||||
|
||||
- when:
|
||||
# setuptools is too old on RHEL/CentOS 6 (https://github.com/Supervisor/meld3/issues/23)
|
||||
- ansible_facts.os_family != 'RedHat' or ansible_facts.distribution_major_version|int > 6
|
||||
# For some reason CentOS 7 and OpenSuSE 15 do not work on ansible-core 2.16
|
||||
- ansible_version.minor != 16 or ansible_facts.distribution not in ['CentOS', 'openSUSE Leap']
|
||||
block:
|
||||
- block:
|
||||
- tempfile:
|
||||
state: directory
|
||||
suffix: supervisorctl-tests
|
||||
register: supervisord_sock_path
|
||||
- block:
|
||||
- tempfile:
|
||||
state: directory
|
||||
suffix: supervisorctl-tests
|
||||
register: supervisord_sock_path
|
||||
|
||||
- command: 'echo {{ remote_tmp_dir }}'
|
||||
register: echo
|
||||
- set_fact:
|
||||
remote_dir: '{{ echo.stdout }}'
|
||||
- command: 'echo {{ remote_tmp_dir }}'
|
||||
register: echo
|
||||
- set_fact:
|
||||
remote_dir: '{{ echo.stdout }}'
|
||||
|
||||
- include_vars: '{{ item }}'
|
||||
with_first_found:
|
||||
- files:
|
||||
- '{{ ansible_facts.distribution }}.yml'
|
||||
- '{{ ansible_facts.os_family }}.yml'
|
||||
- 'defaults.yml'
|
||||
- include_vars: '{{ item }}'
|
||||
with_first_found:
|
||||
- files:
|
||||
- '{{ ansible_facts.distribution }}.yml'
|
||||
- '{{ ansible_facts.os_family }}.yml'
|
||||
- 'defaults.yml'
|
||||
|
||||
- include_tasks: '{{ item }}'
|
||||
with_first_found:
|
||||
- files:
|
||||
- 'install_{{ ansible_facts.distribution }}.yml' # CentOS
|
||||
- 'install_{{ ansible_facts.os_family }}.yml' # RedHat
|
||||
- 'install_{{ ansible_facts.system }}.yml' # Linux
|
||||
- include_tasks: '{{ item }}'
|
||||
with_first_found:
|
||||
- files:
|
||||
- 'install_{{ ansible_facts.distribution }}.yml' # CentOS
|
||||
- 'install_{{ ansible_facts.os_family }}.yml' # RedHat
|
||||
- 'install_{{ ansible_facts.system }}.yml' # Linux
|
||||
|
||||
- include_tasks: test.yml
|
||||
with_items:
|
||||
- { username: '', password: '' }
|
||||
- { username: 'testétest', password: 'passéword' } # non-ASCII credentials
|
||||
loop_control:
|
||||
loop_var: credentials
|
||||
- include_tasks: test.yml
|
||||
with_items:
|
||||
- { username: '', password: '' }
|
||||
- { username: 'testétest', password: 'passéword' } # non-ASCII credentials
|
||||
loop_control:
|
||||
loop_var: credentials
|
||||
|
||||
always:
|
||||
- include_tasks: '{{ item }}'
|
||||
with_first_found:
|
||||
- files:
|
||||
- 'uninstall_{{ ansible_facts.distribution }}.yml' # CentOS
|
||||
- 'uninstall_{{ ansible_facts.os_family }}.yml' # RedHat
|
||||
- 'uninstall_{{ ansible_facts.system }}.yml' # Linux
|
||||
always:
|
||||
- include_tasks: '{{ item }}'
|
||||
with_first_found:
|
||||
- files:
|
||||
- 'uninstall_{{ ansible_facts.distribution }}.yml' # CentOS
|
||||
- 'uninstall_{{ ansible_facts.os_family }}.yml' # RedHat
|
||||
- 'uninstall_{{ ansible_facts.system }}.yml' # Linux
|
||||
|
||||
- file:
|
||||
path: '{{ supervisord_sock_path.path }}'
|
||||
state: absent
|
||||
- file:
|
||||
path: '{{ supervisord_sock_path.path }}'
|
||||
state: absent
|
||||
|
||||
@@ -8,14 +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
|
||||
|
||||
# Because hwclock usually isn't available inside Docker containers in Shippable
|
||||
# these tasks will detect if hwclock works and only run hwclock tests if it is
|
||||
# supported. That is why it is recommended to run these tests locally with
|
||||
# `--docker-privileged` on centos6, centos7 and ubuntu1404 images. Example
|
||||
# command to run on centos6:
|
||||
#
|
||||
# ansible-test integration --docker centos6 --docker-privileged -v timezone
|
||||
|
||||
##
|
||||
## set path to timezone config files
|
||||
##
|
||||
|
||||
@@ -6,11 +6,7 @@ azp/posix/2
|
||||
azp/posix/vm
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
skip/rhel9.3 # FIXME
|
||||
skip/rhel9.7 # FIXME
|
||||
skip/rhel10.0 # FIXME
|
||||
skip/rhel10.1 # FIXME
|
||||
skip/rhel
|
||||
skip/docker
|
||||
needs/root
|
||||
needs/target/setup_epel
|
||||
destructive
|
||||
|
||||
@@ -8,13 +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
|
||||
|
||||
# Make sure ufw is installed
|
||||
- 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 iptables (SuSE only)
|
||||
package:
|
||||
name: iptables
|
||||
|
||||
@@ -83,5 +83,4 @@
|
||||
name: yum-plugin-versionlock
|
||||
state: absent
|
||||
when: yum_versionlock_install is changed
|
||||
when: (ansible_facts.distribution in ['CentOS', 'RedHat'] and ansible_facts.distribution_major_version is version('7', '>=')) or
|
||||
(ansible_facts.distribution == 'Fedora')
|
||||
when: ansible_facts.distribution in ['CentOS', 'RedHat', 'Fedora']
|
||||
|
||||
Reference in New Issue
Block a user