diff --git a/tests/integration/targets/odbc/tasks/main.yml b/tests/integration/targets/odbc/tasks/main.yml index e60198d779..7e2ae852f5 100644 --- a/tests/integration/targets/odbc/tasks/main.yml +++ b/tests/integration/targets/odbc/tasks/main.yml @@ -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: diff --git a/tests/integration/targets/pnpm/tasks/main.yml b/tests/integration/targets/pnpm/tasks/main.yml index 6d8329c259..51387e9a04 100644 --- a/tests/integration/targets/pnpm/tasks/main.yml +++ b/tests/integration/targets/pnpm/tasks/main.yml @@ -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' diff --git a/tests/integration/targets/setup_docker/aliases b/tests/integration/targets/setup_docker/aliases deleted file mode 100644 index 0a430dff10..0000000000 --- a/tests/integration/targets/setup_docker/aliases +++ /dev/null @@ -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 diff --git a/tests/integration/targets/setup_docker/tasks/main.yml b/tests/integration/targets/setup_docker/tasks/main.yml index efbf2b5ca8..45b560673e 100644 --- a/tests/integration/targets/setup_docker/tasks/main.yml +++ b/tests/integration/targets/setup_docker/tasks/main.yml @@ -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 diff --git a/tests/integration/targets/setup_java_keytool/tasks/main.yml b/tests/integration/targets/setup_java_keytool/tasks/main.yml index 42f71c2b30..e8e9dd993f 100644 --- a/tests/integration/targets/setup_java_keytool/tasks/main.yml +++ b/tests/integration/targets/setup_java_keytool/tasks/main.yml @@ -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) }}' diff --git a/tests/integration/targets/setup_openssl/tasks/main.yml b/tests/integration/targets/setup_openssl/tasks/main.yml index 772b6784a6..b2bd47c6d2 100644 --- a/tests/integration/targets/setup_openssl/tasks/main.yml +++ b/tests/integration/targets/setup_openssl/tasks/main.yml @@ -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 diff --git a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml index cb65164097..9f76d42a26 100644 --- a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml +++ b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml @@ -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 diff --git a/tests/integration/targets/setup_snap/aliases b/tests/integration/targets/setup_snap/aliases deleted file mode 100644 index 0a430dff10..0000000000 --- a/tests/integration/targets/setup_snap/aliases +++ /dev/null @@ -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 diff --git a/tests/integration/targets/setup_snap/tasks/main.yml b/tests/integration/targets/setup_snap/tasks/main.yml index 8014e932b0..7aeb34cb05 100644 --- a/tests/integration/targets/setup_snap/tasks/main.yml +++ b/tests/integration/targets/setup_snap/tasks/main.yml @@ -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: diff --git a/tests/integration/targets/setup_wildfly_server/tasks/main.yml b/tests/integration/targets/setup_wildfly_server/tasks/main.yml index 17ea06ca7c..f8a0b50714 100644 --- a/tests/integration/targets/setup_wildfly_server/tasks/main.yml +++ b/tests/integration/targets/setup_wildfly_server/tasks/main.yml @@ -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: diff --git a/tests/integration/targets/supervisorctl/tasks/main.yml b/tests/integration/targets/supervisorctl/tasks/main.yml index 4cf3625759..a84475306d 100644 --- a/tests/integration/targets/supervisorctl/tasks/main.yml +++ b/tests/integration/targets/supervisorctl/tasks/main.yml @@ -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 diff --git a/tests/integration/targets/timezone/tasks/main.yml b/tests/integration/targets/timezone/tasks/main.yml index 3766d82f85..3805a40c41 100644 --- a/tests/integration/targets/timezone/tasks/main.yml +++ b/tests/integration/targets/timezone/tasks/main.yml @@ -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 ## diff --git a/tests/integration/targets/ufw/aliases b/tests/integration/targets/ufw/aliases index 5e3d0dea32..096230dcc4 100644 --- a/tests/integration/targets/ufw/aliases +++ b/tests/integration/targets/ufw/aliases @@ -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 diff --git a/tests/integration/targets/ufw/tasks/main.yml b/tests/integration/targets/ufw/tasks/main.yml index 23e5110bc1..9f6bff47a3 100644 --- a/tests/integration/targets/ufw/tasks/main.yml +++ b/tests/integration/targets/ufw/tasks/main.yml @@ -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 diff --git a/tests/integration/targets/yum_versionlock/tasks/main.yml b/tests/integration/targets/yum_versionlock/tasks/main.yml index 6c89081853..bd1235ae22 100644 --- a/tests/integration/targets/yum_versionlock/tasks/main.yml +++ b/tests/integration/targets/yum_versionlock/tasks/main.yml @@ -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']