diff --git a/test/integration/targets/ansible-galaxy-collection-scm/tasks/main.yml b/test/integration/targets/ansible-galaxy-collection-scm/tasks/main.yml
index f0e78ca02b9..42c37fb97fe 100644
--- a/test/integration/targets/ansible-galaxy-collection-scm/tasks/main.yml
+++ b/test/integration/targets/ansible-galaxy-collection-scm/tasks/main.yml
@@ -48,14 +48,3 @@
name: git
state: absent
when: git_install is changed
-
- # This gets dragged in as a dependency of git on FreeBSD.
- # We need to remove it too when done.
- - name: remove python37 if necessary
- package:
- name: python37
- state: absent
- when:
- - git_install is changed
- - ansible_distribution == 'FreeBSD'
- - ansible_python.version.major == 2
diff --git a/test/integration/targets/ansible-inventory/tasks/toml.yml b/test/integration/targets/ansible-inventory/tasks/toml.yml
index ed9d7839a6f..2fdcf9c67ec 100644
--- a/test/integration/targets/ansible-inventory/tasks/toml.yml
+++ b/test/integration/targets/ansible-inventory/tasks/toml.yml
@@ -49,4 +49,3 @@
- file:
name: unicode_inventory.toml
state: absent
- when: ansible_python.version.major|int == 3
diff --git a/test/integration/targets/ansible-test-container/runme.py b/test/integration/targets/ansible-test-container/runme.py
index 3b86a9a5e14..77a54f71c87 100755
--- a/test/integration/targets/ansible-test-container/runme.py
+++ b/test/integration/targets/ansible-test-container/runme.py
@@ -11,9 +11,7 @@ import functools
import json
import os
import pathlib
-import platform
import pwd
-import re
import secrets
import shlex
import shutil
@@ -1003,25 +1001,6 @@ class DnfBootstrapper(Bootstrapper):
if cls.install_docker():
packages.append('moby-engine')
- if os_release.id == 'fedora' and os_release.version_id == '36':
- # In Fedora 36 the current version of netavark, 1.2.0, causes TCP connect to hang between rootfull containers.
- # The previously tested version, 1.1.0, did not have this issue.
- # Unfortunately, with the release of 1.2.0 the 1.1.0 package was removed from the repositories.
- # Thankfully the 1.0.2 version is available and also works, so we'll use that here until a fixed version is available.
- # See: https://github.com/containers/netavark/issues/491
- packages.append('netavark-1.0.2')
-
- if os_release.id == 'fedora' and os_release.version_id == '39':
- # In Fedora 39, the current version of containerd, 1.6.23, prevents Docker from working.
- # The previously tested version, 1.6.19, did not have this issue.
- # See: https://bugzilla.redhat.com/show_bug.cgi?id=2237396
- arch = platform.machine()
-
- run_command(
- 'dnf', 'install', '-y',
- f'https://kojipkgs.fedoraproject.org/packages/containerd/1.6.19/2.fc39/{arch}/containerd-1.6.19-2.fc39.{arch}.rpm'
- )
-
if os_release.id == 'rhel':
# As of the release of RHEL 9.1, installing podman on RHEL 9.0 results in a non-fatal error at install time:
#
@@ -1046,19 +1025,6 @@ class DnfBootstrapper(Bootstrapper):
if cls.install_docker():
run_command('systemctl', 'start', 'docker')
- if os_release.id == 'rhel' and os_release.version_id.startswith('8.'):
- # RHEL 8 defaults to using runc instead of crun.
- # Unfortunately runc seems to have issues with podman remote.
- # Specifically, it tends to cause conmon to burn CPU until it reaches the specified exit delay.
- # So we'll just change the system default to crun instead.
- # Unfortunately we can't do this with the `--runtime` option since that doesn't work with podman remote.
-
- conf = pathlib.Path('/usr/share/containers/containers.conf').read_text()
-
- conf = re.sub('^runtime .*', 'runtime = "crun"', conf, flags=re.MULTILINE)
-
- pathlib.Path('/etc/containers/containers.conf').write_text(conf)
-
super().run()
@@ -1068,7 +1034,7 @@ class AptBootstrapper(Bootstrapper):
@classmethod
def install_podman(cls) -> bool:
"""Return True if podman will be installed."""
- return not (os_release.id == 'ubuntu' and os_release.version_id in {'20.04', '22.04'})
+ return True
@classmethod
def install_docker(cls) -> bool:
diff --git a/test/integration/targets/ansible-test-git/collection-tests/uninstall-git.yml b/test/integration/targets/ansible-test-git/collection-tests/uninstall-git.yml
index f94caea7d96..395d8c838df 100644
--- a/test/integration/targets/ansible-test-git/collection-tests/uninstall-git.yml
+++ b/test/integration/targets/ansible-test-git/collection-tests/uninstall-git.yml
@@ -4,15 +4,3 @@
package:
name: git
state: absent
- register: git_remove
-
- # This gets dragged in as a dependency of git on FreeBSD.
- # We need to remove it too when done.
- - name: remove python37 if necessary
- package:
- name: python37
- state: absent
- when:
- - git_remove is changed
- - ansible_distribution == 'FreeBSD'
- - ansible_python.version.major == 2
diff --git a/test/integration/targets/ansible-vault/single_vault_as_string.yml b/test/integration/targets/ansible-vault/single_vault_as_string.yml
index 941bb83e19b..0281496c757 100644
--- a/test/integration/targets/ansible-vault/single_vault_as_string.yml
+++ b/test/integration/targets/ansible-vault/single_vault_as_string.yml
@@ -69,14 +69,6 @@
- vaulted_value|random(seed='foo') == ' '
- vaulted_value|shuffle(seed='foo') == ["o", "f", "r", "b", "o", "a", " "]
- vaulted_value|pprint == "'foo bar'"
- when: ansible_python.version.major == 3
-
- - assert:
- that:
- - vaulted_value|random(seed='foo') == 'r'
- - vaulted_value|shuffle(seed='foo') == ["b", "o", "a", " ", "o", "f", "r"]
- - vaulted_value|pprint == "u'foo bar'"
- when: ansible_python.version.major == 2
- assert:
that:
diff --git a/test/integration/targets/apt/vars/Ubuntu-20.yml b/test/integration/targets/apt/vars/Ubuntu-20.yml
deleted file mode 100644
index 7b32755fbf7..00000000000
--- a/test/integration/targets/apt/vars/Ubuntu-20.yml
+++ /dev/null
@@ -1 +0,0 @@
-multiarch_test_pkg: libunistring2
diff --git a/test/integration/targets/become_unprivileged/cleanup_unpriv_users.yml b/test/integration/targets/become_unprivileged/cleanup_unpriv_users.yml
index 8be2fe60fc9..7f70b788728 100644
--- a/test/integration/targets/become_unprivileged/cleanup_unpriv_users.yml
+++ b/test/integration/targets/become_unprivileged/cleanup_unpriv_users.yml
@@ -40,13 +40,6 @@
sudoers_etc: /etc
when: ansible_distribution != 'FreeBSD'
- - name: Undo OpenSUSE
- lineinfile:
- path: "{{ sudoers_etc }}/sudoers"
- regexp: '^### Defaults targetpw'
- line: 'Defaults targetpw'
- backrefs: yes
-
- name: Nuke custom sudoers file
file:
path: "{{ sudoers_etc }}/sudoers.d/unpriv1"
diff --git a/test/integration/targets/become_unprivileged/setup_unpriv_users.yml b/test/integration/targets/become_unprivileged/setup_unpriv_users.yml
index 4f677413058..a9a080d1721 100644
--- a/test/integration/targets/become_unprivileged/setup_unpriv_users.yml
+++ b/test/integration/targets/become_unprivileged/setup_unpriv_users.yml
@@ -98,12 +98,3 @@
owner: root
group: "{{ chowngroup }}"
mode: 0644
-
- # OpenSUSE has a weird sudo default here and requires the root pw
- # instead of the user pw. Undo that setting, we can clean it up later.
- - name: Make it so unpriv1 can sudo (Chapter 2 - The Return Of the OpenSUSE)
- lineinfile:
- dest: "{{ sudoers_etc }}/sudoers"
- regexp: '^Defaults targetpw'
- line: '### Defaults targetpw'
- backrefs: yes
diff --git a/test/integration/targets/cron/tasks/main.yml b/test/integration/targets/cron/tasks/main.yml
index 32e345d32ce..45640e1e82b 100644
--- a/test/integration/targets/cron/tasks/main.yml
+++ b/test/integration/targets/cron/tasks/main.yml
@@ -10,13 +10,6 @@
paths:
- vars
-# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726661
-- name: Work around vixie-cron/PAM issue on old distros
- command: sed -i '/pam_loginuid/ s/^/#/' /etc/pam.d/crond
- when:
- - ansible_distribution in ('RedHat', 'CentOS')
- - ansible_distribution_major_version is version('6', '==')
-
- name: add cron task (check mode enabled, cron task not already created)
cron:
name: test cron task
diff --git a/test/integration/targets/dnf/tasks/gpg.yml b/test/integration/targets/dnf/tasks/gpg.yml
index 72bdee02ce6..a51a5f74632 100644
--- a/test/integration/targets/dnf/tasks/gpg.yml
+++ b/test/integration/targets/dnf/tasks/gpg.yml
@@ -32,14 +32,6 @@
- name: Unsign the RPM
shell: rpmsign --delsign {{ remote_tmp_dir }}/unsigned/{{ pkg_name }}*
- # In RHEL 8.5 dnf uses libdnf to do checksum verification, which caches the checksum on an xattr of the file
- # itself, so we need to clear that cache
- - name: Clear libdnf checksum cache
- shell: setfattr -x user.Librepo.checksum.sha256 {{ remote_tmp_dir }}/unsigned/{{ pkg_name }}*
- when: ansible_distribution in ['RedHat', 'CentOS'] and
- ansible_distribution_version is version('8.5', '>=') and
- ansible_distribution_version is version('9', '<')
-
- name: createrepo
command: createrepo .
args:
diff --git a/test/integration/targets/dnf/tasks/logging.yml b/test/integration/targets/dnf/tasks/logging.yml
index 903bf563052..f3e8503c433 100644
--- a/test/integration/targets/dnf/tasks/logging.yml
+++ b/test/integration/targets/dnf/tasks/logging.yml
@@ -1,24 +1,3 @@
-# Verify logging function is enabled in the dnf module.
-# The following tasks has been supported in dnf-4.2.17-6 or later
-# Note: https://bugzilla.redhat.com/show_bug.cgi?id=1788212
-- name: Install latest version python3-dnf
- dnf:
- name:
- - python3-dnf
- - python3-libdnf # https://bugzilla.redhat.com/show_bug.cgi?id=1887502
- - libmodulemd # https://bugzilla.redhat.com/show_bug.cgi?id=1942236
- state: latest
- register: dnf_result
-
-- name: Verify python3-dnf installed
- assert:
- that:
- - "dnf_result.rc == 0"
-
-- name: Get python3-dnf version
- shell: "dnf info python3-dnf | awk '/^Version/ { print $3 }'"
- register: py3_dnf_version
-
- name: Check logging enabled
block:
- name: remove logfiles if exist
@@ -44,5 +23,3 @@
that:
- "item.stat.exists"
loop: "{{ stats.results }}"
- when:
- - 'py3_dnf_version.stdout is version("4.2.17", ">=")'
diff --git a/test/integration/targets/dnf/tasks/main.yml b/test/integration/targets/dnf/tasks/main.yml
index e0a84e1808d..2d98d332012 100644
--- a/test/integration/targets/dnf/tasks/main.yml
+++ b/test/integration/targets/dnf/tasks/main.yml
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see .
-- when: not (ansible_distribution == 'Fedora' and ansible_distribution_version is version(41, '>=') and not (dnf5 | default(False)))
+- when: dnf5 | default(False)
block:
- block:
- include_tasks: dnf.yml
diff --git a/test/integration/targets/git/tasks/archive.yml b/test/integration/targets/git/tasks/archive.yml
index 7fd53002826..cc6e5dd6222 100644
--- a/test/integration/targets/git/tasks/archive.yml
+++ b/test/integration/targets/git/tasks/archive.yml
@@ -24,9 +24,7 @@
- name: ARCHIVE | Assert that archive files exist
assert:
that: (archive_check.results | map(attribute='stat.exists') | unique | list)[0]
- when:
- - "ansible_os_family == 'RedHat'"
- - ansible_distribution_major_version is version('7', '>=')
+ when: ansible_os_family == 'RedHat'
- name: ARCHIVE | Clear checkout_dir
file:
@@ -61,9 +59,7 @@
- name: ARCHIVE | Assert that archive files exist
assert:
that: (archive_check.results | map(attribute='stat.exists') | unique | list)[0]
- when:
- - "ansible_os_family == 'RedHat'"
- - ansible_distribution_major_version is version('7', '>=')
+ when: ansible_os_family == 'RedHat'
- name: ARCHIVE | Inspect archive file
command:
diff --git a/test/integration/targets/git/tasks/main.yml b/test/integration/targets/git/tasks/main.yml
index 228aaf01484..39016615b6d 100644
--- a/test/integration/targets/git/tasks/main.yml
+++ b/test/integration/targets/git/tasks/main.yml
@@ -40,7 +40,6 @@
when:
- not gpg_version.stderr
- gpg_version.stdout is truthy
- - not (ansible_os_family == 'RedHat' and ansible_distribution_major_version is version('7', '<'))
- import_tasks: localmods.yml
- import_tasks: reset-origin.yml
- import_tasks: ambiguous-ref.yml
diff --git a/test/integration/targets/git/vars/main.yml b/test/integration/targets/git/vars/main.yml
index 55c7c4384a0..e6d7d63c358 100644
--- a/test/integration/targets/git/vars/main.yml
+++ b/test/integration/targets/git/vars/main.yml
@@ -4,9 +4,6 @@ git_archive_extensions:
- tar
- tgz
- zip
- RedHat6:
- - tar
- - zip
git_required_packages:
default:
diff --git a/test/integration/targets/group/tasks/tests.yml b/test/integration/targets/group/tasks/tests.yml
index eb92cd1df04..c4f90be5de7 100644
--- a/test/integration/targets/group/tasks/tests.yml
+++ b/test/integration/targets/group/tasks/tests.yml
@@ -218,7 +218,7 @@
args:
name: libuser
state: present
- when: ansible_facts.system in ['Linux'] and ansible_distribution != 'Alpine' and ansible_os_family != 'Suse'
+ when: ansible_facts.system in ['Linux'] and ansible_distribution != 'Alpine'
tags:
- user_test_local_mode
diff --git a/test/integration/targets/hostname/tasks/test_normal.yml b/test/integration/targets/hostname/tasks/test_normal.yml
index 9534d73badf..42e49b55d96 100644
--- a/test/integration/targets/hostname/tasks/test_normal.yml
+++ b/test/integration/targets/hostname/tasks/test_normal.yml
@@ -1,18 +1,4 @@
-- name: Ensure hostname doesn't confuse NetworkManager
- when: ansible_os_family == 'RedHat' and ansible_distribution_major_version is version('8')
- block:
- - name: slurp /var/log/messages
- slurp:
- path: /var/log/messages
- become: yes
- register: messages_before
-
- - assert:
- that:
- - >
- 'current hostname was changed outside NetworkManager' not in messages_before.content|b64decode
-
-- name: Run hostname module for real now
+- name: Run hostname module
become: 'yes'
hostname:
name: crocodile.ansible.test.doesthiswork.net.example.com
@@ -22,20 +8,6 @@
command: hostname
register: current_after_hn2
-- name: Ensure hostname doesn't confuse NetworkManager
- when: ansible_os_family == 'RedHat' and ansible_distribution_major_version is version('8')
- block:
- - name: slurp /var/log/messages
- slurp:
- path: /var/log/messages
- become: yes
- register: messages_after
-
- - assert:
- that:
- - >
- 'current hostname was changed outside NetworkManager' not in messages_after.content|b64decode
-
- name: Run hostname again to ensure it does not change
become: 'yes'
hostname:
diff --git a/test/integration/targets/loop-until/tasks/main.yml b/test/integration/targets/loop-until/tasks/main.yml
index bb3799a30f5..40df2fa8ad5 100644
--- a/test/integration/targets/loop-until/tasks/main.yml
+++ b/test/integration/targets/loop-until/tasks/main.yml
@@ -29,12 +29,6 @@
index_var: idx
loop_var: tmp_file
-# `select` filter is only available since Jinja 2.7,
-# thus tests are failing under CentOS in CI
-#- set_fact:
-# until_tempfile_path_var_names: >
-# {{ vars | select('match', '^until_tempfile_path_') | list }}
-
- name: loop and until with 6 retries
shell: echo "run" >> {{ lookup('vars', tmp_file_var) }} && wc -w < {{ lookup('vars', tmp_file_var) }} | tr -d ' '
register: runcount
diff --git a/test/integration/targets/package/tasks/main.yml b/test/integration/targets/package/tasks/main.yml
index 92868e7b0b9..f66f11e46bb 100644
--- a/test/integration/targets/package/tasks/main.yml
+++ b/test/integration/targets/package/tasks/main.yml
@@ -102,11 +102,8 @@
set_fact:
package_distros:
- RedHat
- - CentOS
- - ScientificLinux
- Fedora
- Ubuntu
- - Debian
- block:
- name: remove at package
diff --git a/test/integration/targets/package_facts/tasks/main.yml b/test/integration/targets/package_facts/tasks/main.yml
index 9309dca2aa9..8e5e1b34b0d 100644
--- a/test/integration/targets/package_facts/tasks/main.yml
+++ b/test/integration/targets/package_facts/tasks/main.yml
@@ -3,13 +3,8 @@
- name: Prep package_fact tests - Debian Family
block:
- - name: install python apt bindings - python2
- package: name="python-apt" state=present
- when: ansible_python.version.major|int == 2
-
- name: install python apt bindings - python3
package: name="python3-apt" state=present
- when: ansible_python.version.major|int == 3
- name: Gather package facts
package_facts:
@@ -71,25 +66,6 @@
that: ansible_facts.packages is defined
when: (ansible_os_family == "RedHat")
-- name: Run package_fact tests - SUSE/OpenSUSE Family
- block:
- - name: install python rpm bindings - python2
- package: name="rpm-python" state=present
- when: ansible_python.version.major|int == 2
-
- - name: install python rpm bindings - python3
- package: name="python3-rpm" state=present
- when: ansible_python.version.major|int == 3
-
- - name: Gather package facts
- package_facts:
- manager: rpm
-
- - name: check for ansible_facts.packages exists
- assert:
- that: ansible_facts.packages is defined
- when: (ansible_os_family == "openSUSE Leap") or (ansible_os_family == "Suse")
-
- name: Same as those above, but based on pkg_mgr, tests aliases
block:
- name: Gather package facts
@@ -101,7 +77,7 @@
that:
- ansible_facts.packages is defined
- ansible_facts.packages | length > 1
- when: ansible_facts['os_family'] in ["openSUSE Leap", "Suse", "RedHat", "Debian"]
+ when: ansible_facts['os_family'] in ["RedHat", "Debian"]
# Check that auto detection works also
- name: Gather package facts
diff --git a/test/integration/targets/pip/tasks/main.yml b/test/integration/targets/pip/tasks/main.yml
index b05b04f908b..268cc8c28ba 100644
--- a/test/integration/targets/pip/tasks/main.yml
+++ b/test/integration/targets/pip/tasks/main.yml
@@ -4,30 +4,9 @@
- include_tasks:
file: break_system_packages.yml
-- name: Python 2
- when: ansible_python.version.major == 2
- block:
- - name: find virtualenv command
- command: "which virtualenv virtualenv-{{ ansible_python.version.major }}.{{ ansible_python.version.minor }}"
- register: command
- ignore_errors: true
-
- - name: is virtualenv available to python -m
- command: '{{ ansible_python_interpreter }} -m virtualenv'
- register: python_m
- when: not command.stdout_lines
- failed_when: python_m.rc != 2
-
- - name: remember selected virtualenv command
- set_fact:
- virtualenv: "{{ command.stdout_lines[0] if command is successful else ansible_python_interpreter ~ ' -m virtualenv' }}"
-
-- name: Python 3+
- when: ansible_python.version.major > 2
- block:
- - name: remember selected virtualenv command
- set_fact:
- virtualenv: "{{ ansible_python_interpreter ~ ' -m venv' }}"
+- name: remember selected virtualenv command
+ set_fact:
+ virtualenv: "{{ ansible_python_interpreter ~ ' -m venv' }}"
- block:
- name: install git, needed for repo installs
@@ -45,7 +24,6 @@
- include_tasks: pip.yml
- include_tasks: no_setuptools.yml
- when: ansible_python.version_info[:2] >= [3, 8]
always:
- name: platform specific cleanup
include_tasks: "{{ cleanup_filename }}"
diff --git a/test/integration/targets/pip/tasks/pip.yml b/test/integration/targets/pip/tasks/pip.yml
index abe90db803c..9bdb2f79485 100644
--- a/test/integration/targets/pip/tasks/pip.yml
+++ b/test/integration/targets/pip/tasks/pip.yml
@@ -513,63 +513,7 @@
name: "{{ pip_test_packages }}"
state: absent
-# https://github.com/ansible/ansible/issues/47198
-# distribute is a legacy package that will fail on newer Python 3 versions
-- block:
- - name: make sure the virtualenv does not exist
- file:
- state: absent
- name: "{{ remote_tmp_dir }}/pipenv"
-
- - name: install distribute in the virtualenv
- pip:
- # using -c for constraints is not supported as long as tests are executed using the centos6 container
- # since the pip version in the venv is not upgraded and is too old (6.0.8)
- name:
- - distribute
- - setuptools<45 # setuptools 45 and later require python 3.5 or later
- virtualenv: "{{ remote_tmp_dir }}/pipenv"
- state: present
-
- - name: try to remove distribute
- pip:
- state: "absent"
- name: "distribute"
- virtualenv: "{{ remote_tmp_dir }}/pipenv"
- ignore_errors: yes
- register: remove_distribute
-
- - name: inspect the cmd
- assert:
- that: "'distribute' in remove_distribute.cmd"
- when: ansible_python.version.major == 2
-
-### test virtualenv_command begin ###
-
-- name: Test virtualenv command with arguments
- when: ansible_python.version.major == 2
- block:
- - name: make sure the virtualenv does not exist
- file:
- state: absent
- name: "{{ remote_tmp_dir }}/pipenv"
-
- # ref: https://github.com/ansible/ansible/issues/52275
- - name: install using virtualenv_command with arguments
- pip:
- name: "{{ pip_test_package }}"
- virtualenv: "{{ remote_tmp_dir }}/pipenv"
- virtualenv_command: "{{ command.stdout_lines[0] | basename }} --verbose"
- state: present
- register: version13
-
- - name: ensure install using virtualenv_command with arguments was successful
- assert:
- that:
- - "version13 is success"
-
- name: Test virtualenv command with venv formatting
- when: ansible_python.version.major > 2
block:
- name: Clean up the virtualenv
file:
@@ -590,8 +534,6 @@
that:
- "version14 is changed"
-### test virtualenv_command end ###
-
# https://github.com/ansible/ansible/issues/68592
# Handle pre-release version numbers in check_mode for already-installed
# packages.
diff --git a/test/integration/targets/prepare_http_tests/tasks/default.yml b/test/integration/targets/prepare_http_tests/tasks/default.yml
index 50e3978860c..57fd4d523e9 100644
--- a/test/integration/targets/prepare_http_tests/tasks/default.yml
+++ b/test/integration/targets/prepare_http_tests/tasks/default.yml
@@ -16,12 +16,6 @@
- client.pem
- client.key
-- name: Suse - Retrieve test cacert
- get_url:
- url: "http://ansible.http.tests/cacert.pem"
- dest: "/etc/pki/trust/anchors/ansible.pem"
- when: ansible_os_family == 'Suse'
-
- name: Debian/Alpine - Retrieve test cacert
get_url:
url: "http://ansible.http.tests/cacert.pem"
@@ -32,9 +26,9 @@
command: update-ca-trust extract
when: ansible_os_family == 'RedHat'
-- name: Debian/Alpine/Suse - Update ca certificates
+- name: Debian/Alpine - Update ca certificates
command: update-ca-certificates
- when: ansible_os_family in ['Debian', 'Alpine', 'Suse']
+ when: ansible_os_family in ['Debian', 'Alpine']
- name: Update cacert
when: ansible_os_family in ['FreeBSD', 'Darwin']
diff --git a/test/integration/targets/reboot/tasks/test_invalid_test_command.yml b/test/integration/targets/reboot/tasks/test_invalid_test_command.yml
index ea1db81deaf..a9fb0202dfb 100644
--- a/test/integration/targets/reboot/tasks/test_invalid_test_command.yml
+++ b/test/integration/targets/reboot/tasks/test_invalid_test_command.yml
@@ -5,4 +5,4 @@
register: reboot_fail_test
failed_when: "reboot_fail_test.msg != 'Timed out waiting for post-reboot test command (timeout=' ~ timeout ~ ')'"
vars:
- timeout: "{{ _timeout_value[ansible_facts['distribution'] | lower] | default(60) }}"
+ timeout: 60
diff --git a/test/integration/targets/reboot/vars/main.yml b/test/integration/targets/reboot/vars/main.yml
index 0e1997c48e9..06b766d6baa 100644
--- a/test/integration/targets/reboot/vars/main.yml
+++ b/test/integration/targets/reboot/vars/main.yml
@@ -1,9 +1,3 @@
_boot_time_command:
freebsd: '/sbin/sysctl kern.boottime'
- openbsd: '/sbin/sysctl kern.boottime'
macosx: 'who -b'
- solaris: 'who -b'
- sunos: 'who -b'
-
-_timeout_value:
- solaris: 120
diff --git a/test/integration/targets/replace/tasks/main.yml b/test/integration/targets/replace/tasks/main.yml
index ca8b4ec11b3..af428ea998b 100644
--- a/test/integration/targets/replace/tasks/main.yml
+++ b/test/integration/targets/replace/tasks/main.yml
@@ -264,7 +264,7 @@
- replace_cat8.stdout_lines[7] == "0.0.0.0"
- replace_cat8.stdout_lines[13] == "0.0.0.0"
-# For Python 3.6 or greater - https://github.com/ansible/ansible/issues/79364
+# https://github.com/ansible/ansible/issues/79364
- name: Handle bad escape character in regular expression
replace:
path: /dev/null
@@ -274,11 +274,9 @@
replace: '\D'
ignore_errors: true
register: replace_test9
- when: ansible_python.version.major == 3 and ansible_python.version.minor > 6
- name: Validate the failure
assert:
that:
- replace_test9 is failure
- replace_test9.msg.startswith("Unable to process replace")
- when: ansible_python.version.major == 3 and ansible_python.version.minor > 6
diff --git a/test/integration/targets/service/files/ansible.sysv b/test/integration/targets/service/files/ansible.sysv
index 1df0423d227..edcd3175235 100755
--- a/test/integration/targets/service/files/ansible.sysv
+++ b/test/integration/targets/service/files/ansible.sysv
@@ -22,12 +22,9 @@
[ -x /usr/sbin/ansible_test_service ] || exit 0
DEBIAN_VERSION=/etc/debian_version
-SUSE_RELEASE=/etc/SuSE-release
# Source function library.
if [ -f $DEBIAN_VERSION ]; then
. /lib/lsb/init-functions
-elif [ -f $SUSE_RELEASE -a -r /etc/rc.status ]; then
- . /etc/rc.status
else
. /etc/rc.d/init.d/functions
fi
@@ -45,10 +42,7 @@ RETVAL=0
start() {
echo -n "Starting ansible test daemon: "
- if [ -f $SUSE_RELEASE ]; then
- startproc -p /var/run/${SERVICE}.pid -f /usr/sbin/ansible_test_service
- rc_status -v
- elif [ -e $DEBIAN_VERSION ]; then
+ if [ -e $DEBIAN_VERSION ]; then
if [ -f $LOCKFILE ]; then
echo -n "already started, lock file found"
RETVAL=1
@@ -67,10 +61,7 @@ start() {
stop() {
echo -n "Stopping ansible test daemon: "
- if [ -f $SUSE_RELEASE ]; then
- killproc -TERM /usr/sbin/ansible_test_service
- rc_status -v
- elif [ -f $DEBIAN_VERSION ]; then
+ if [ -f $DEBIAN_VERSION ]; then
# Added this since Debian's start-stop-daemon doesn't support spawned processes
if ps -ef | grep "/usr/sbin/ansible_test_service" | grep -v grep | awk '{print $2}' | xargs kill &> /dev/null; then
echo -n "OK"
@@ -101,11 +92,7 @@ case "$1" in
$1
;;
status)
- if [ -f $SUSE_RELEASE ]; then
- echo -n "Checking for ansible test service "
- checkproc /usr/sbin/ansible_test_service
- rc_status -v
- elif [ -f $DEBIAN_VERSION ]; then
+ if [ -f $DEBIAN_VERSION ]; then
if [ -f $LOCKFILE ]; then
RETVAL=0
echo "ansible test is running."
diff --git a/test/integration/targets/setup_paramiko/install-RedHat-8-python-3.yml b/test/integration/targets/setup_paramiko/install-RedHat-8-python-3.yml
deleted file mode 100644
index 55677f21b06..00000000000
--- a/test/integration/targets/setup_paramiko/install-RedHat-8-python-3.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-- name: Setup remote constraints
- include_tasks: setup-remote-constraints.yml
-- name: Install Paramiko for Python 3 on RHEL 8
- pip: # no python3-paramiko package exists for RHEL 8
- name: paramiko
- extra_args: "-c {{ remote_constraints }}"
- environment:
- SETUPTOOLS_USE_DISTUTILS: stdlib
diff --git a/test/integration/targets/setup_paramiko/uninstall-RedHat-8-python-3.yml b/test/integration/targets/setup_paramiko/uninstall-RedHat-8-python-3.yml
deleted file mode 100644
index d3a9493e0e7..00000000000
--- a/test/integration/targets/setup_paramiko/uninstall-RedHat-8-python-3.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-- name: Uninstall Paramiko for Python 3 on RHEL 8
- pip: # no python3-paramiko package exists for RHEL 8
- name: paramiko
- state: absent
diff --git a/test/integration/targets/setup_paramiko/uninstall-zypper-python-3.yml b/test/integration/targets/setup_paramiko/uninstall-zypper-python-3.yml
deleted file mode 100644
index 339be6fe2fc..00000000000
--- a/test/integration/targets/setup_paramiko/uninstall-zypper-python-3.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-- name: Uninstall Paramiko for Python 3 using zypper
- command: zypper --quiet --non-interactive remove --clean-deps python3-paramiko
diff --git a/test/integration/targets/subversion/roles/subversion/templates/subversion.conf.j2 b/test/integration/targets/subversion/roles/subversion/templates/subversion.conf.j2
index 74d7cc13885..1d0c8f8e710 100644
--- a/test/integration/targets/subversion/roles/subversion/templates/subversion.conf.j2
+++ b/test/integration/targets/subversion/roles/subversion/templates/subversion.conf.j2
@@ -1,10 +1,5 @@
{% if ansible_os_family == "Debian" %}
-{# On Ubuntu 16.04 we can include the default config, other versions require explicit config #}
-{% if ansible_distribution_version == "16.04" %}
-Include /etc/apache2/apache2.conf
-
-{% else %}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
@@ -29,19 +24,12 @@ IncludeOptional sites-enabled/*conf
Require all denied
-{% endif %}
-
{% elif ansible_os_family == "FreeBSD" %}
Include /usr/local/etc/apache24/httpd.conf
LoadModule ssl_module libexec/apache24/mod_ssl.so
LoadModule dav_module libexec/apache24/mod_dav.so
LoadModule dav_svn_module libexec/apache24/mod_dav_svn.so
LoadModule authz_svn_module libexec/apache24/mod_authz_svn.so
-{% elif ansible_os_family == "Suse" %}
-Include /etc/apache2/httpd.conf
-Include mods-available/ssl.load
-LoadModule dav_module /usr/lib64/apache2/mod_dav.so
-LoadModule dav_svn_module /usr/lib64/apache2/mod_dav_svn.so
{% elif ansible_os_family == "Alpine" %}
Include /etc/apache2/httpd.conf
LoadModule dav_module /usr/lib/apache2/mod_dav.so
@@ -61,11 +49,7 @@ ErrorLog {{ subversion_server_dir }}/apache2-error.log
DAV svn
SVNParentPath {{ subversion_server_dir }}
-{% if ansible_distribution == "CentOS" and ansible_distribution_version.startswith("6") %}
- Allow from all
-{% else %}
Require all granted
-{% endif %}
diff --git a/test/integration/targets/unarchive/tasks/test_include.yml b/test/integration/targets/unarchive/tasks/test_include.yml
index ea3a01cf2e8..9470fe90a44 100644
--- a/test/integration/targets/unarchive/tasks/test_include.yml
+++ b/test/integration/targets/unarchive/tasks/test_include.yml
@@ -50,9 +50,7 @@
- file_names == ['foo-unarchive-777.txt']
vars:
file_names: "{{ unarchive_dir03.files | map(attribute='path') | map('basename') }}"
- when:
- - "ansible_facts.os_family == 'RedHat'"
- - ansible_facts.distribution_major_version is version('7', '>=')
+ when: ansible_facts.os_family == 'RedHat'
- name: Check mutually exclusive parameters
unarchive:
diff --git a/test/integration/targets/user/tasks/main.yml b/test/integration/targets/user/tasks/main.yml
index 001bf7a8596..6a3c84eecd7 100644
--- a/test/integration/targets/user/tasks/main.yml
+++ b/test/integration/targets/user/tasks/main.yml
@@ -17,16 +17,13 @@
- import_tasks: test_expires_no_shadow.yml
- import_tasks: test_expires_min_max.yml
- import_tasks: test_expires_warn.yml
-- import_tasks: test_shadow_backup.yml
- import_tasks: test_ssh_key_passphrase.yml
- include_tasks: test_password_lock.yml
when: ansible_distribution != 'Alpine'
- include_tasks: test_password_lock_new_user.yml
when: ansible_distribution != 'Alpine'
- include_tasks: test_local.yml
- when:
- - not (ansible_distribution == 'openSUSE Leap' and ansible_distribution_version is version('15.4', '>='))
- - ansible_distribution != 'Alpine'
+ when: ansible_distribution != 'Alpine'
- include_tasks: test_umask.yml
when:
- ansible_facts.system == 'Linux'
diff --git a/test/integration/targets/user/tasks/test_create_user_password.yml b/test/integration/targets/user/tasks/test_create_user_password.yml
index f22ef6ba002..3724ee86b86 100644
--- a/test/integration/targets/user/tasks/test_create_user_password.yml
+++ b/test/integration/targets/user/tasks/test_create_user_password.yml
@@ -25,7 +25,7 @@
- test_user_update_password is not changed
- name: Verify password hash for Linux
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
block:
- name: LINUX | Get shadow entry for ansibulluser
getent:
diff --git a/test/integration/targets/user/tasks/test_expires.yml b/test/integration/targets/user/tasks/test_expires.yml
index e05ed6feedf..727a0f7a911 100644
--- a/test/integration/targets/user/tasks/test_expires.yml
+++ b/test/integration/targets/user/tasks/test_expires.yml
@@ -30,7 +30,7 @@
assert:
that:
- getent_shadow['ansibulluser'][6] == '29281'
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
- name: Verify expiration date for BSD
@@ -65,7 +65,7 @@
msg: "expiry is supposed to be empty or -1, not {{ getent_shadow['ansibulluser'][6] }}"
that:
- not getent_shadow['ansibulluser'][6] or getent_shadow['ansibulluser'][6] | int < 0
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
- name: Verify un expiration date for Linux/BSD
block:
@@ -82,7 +82,7 @@
that:
- user_test_expires3 is changed
- user_test_expires4 is not changed
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse', 'FreeBSD']
+ when: ansible_facts.os_family in ['RedHat', 'Debian', 'FreeBSD']
- name: Verify un expiration date for BSD
block:
diff --git a/test/integration/targets/user/tasks/test_expires_min_max.yml b/test/integration/targets/user/tasks/test_expires_min_max.yml
index 0b8037918d6..9407c3a5320 100644
--- a/test/integration/targets/user/tasks/test_expires_min_max.yml
+++ b/test/integration/targets/user/tasks/test_expires_min_max.yml
@@ -1,6 +1,6 @@
# https://github.com/ansible/ansible/issues/68775
- name: Test setting maximum expiration
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
block:
- name: create user
user:
diff --git a/test/integration/targets/user/tasks/test_expires_new_account.yml b/test/integration/targets/user/tasks/test_expires_new_account.yml
index b77d137f82a..3a35cc9d0b0 100644
--- a/test/integration/targets/user/tasks/test_expires_new_account.yml
+++ b/test/integration/targets/user/tasks/test_expires_new_account.yml
@@ -38,7 +38,7 @@
msg: "expiry is supposed to be empty or -1, not {{ getent_shadow['ansibulluser'][6] }}"
that:
- not getent_shadow['ansibulluser'][6] or getent_shadow['ansibulluser'][6] | int < 0
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
- name: Verify un expiration date for BSD
block:
diff --git a/test/integration/targets/user/tasks/test_expires_new_account_epoch_negative.yml b/test/integration/targets/user/tasks/test_expires_new_account_epoch_negative.yml
index 77a07c4a3c2..a3be90ac9cc 100644
--- a/test/integration/targets/user/tasks/test_expires_new_account_epoch_negative.yml
+++ b/test/integration/targets/user/tasks/test_expires_new_account_epoch_negative.yml
@@ -53,7 +53,7 @@
msg: "expiry is supposed to be empty or -1, not {{ getent_shadow['ansibulluser'][6] }}"
that:
- not getent_shadow['ansibulluser'][6] or getent_shadow['ansibulluser'][6] | int < 0
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
- name: Verify proper expiration behavior for BSD
@@ -95,7 +95,7 @@
msg: "expiry is supposed to be empty or -1, not {{ getent_shadow['ansibulluser'][6] }}"
that:
- not getent_shadow['ansibulluser'][6] or getent_shadow['ansibulluser'][6] | int < 0
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
- name: Verify un expiration date for BSD
block:
diff --git a/test/integration/targets/user/tasks/test_expires_no_shadow.yml b/test/integration/targets/user/tasks/test_expires_no_shadow.yml
index 4629c6fb07b..bf88ad88771 100644
--- a/test/integration/targets/user/tasks/test_expires_no_shadow.yml
+++ b/test/integration/targets/user/tasks/test_expires_no_shadow.yml
@@ -1,6 +1,6 @@
# https://github.com/ansible/ansible/issues/71916
- name: Test setting expiration for a user account that does not have an /etc/shadow entry
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
block:
- name: Remove ansibulluser
user:
diff --git a/test/integration/targets/user/tasks/test_expires_warn.yml b/test/integration/targets/user/tasks/test_expires_warn.yml
index afe033cc2a9..f62f3409de9 100644
--- a/test/integration/targets/user/tasks/test_expires_warn.yml
+++ b/test/integration/targets/user/tasks/test_expires_warn.yml
@@ -1,6 +1,6 @@
# https://github.com/ansible/ansible/issues/79882
- name: Test setting warning days
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
block:
- name: create user
user:
diff --git a/test/integration/targets/user/tasks/test_inactive_new_account.yml b/test/integration/targets/user/tasks/test_inactive_new_account.yml
index 984ac9d3b78..7b86aa0737d 100644
--- a/test/integration/targets/user/tasks/test_inactive_new_account.yml
+++ b/test/integration/targets/user/tasks/test_inactive_new_account.yml
@@ -1,74 +1,41 @@
-# Test inactive setting when creating a new account
-- name: Remove ansibulluser
- user:
- name: ansibulluser
- state: absent
-
-- name: Create user account with inactive set to 15
- user:
- name: ansibulluser
- state: present
- password_expire_account_disable: 15
-
-- name: Verify inactive setting for Linux
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
- block:
- - name: LINUX | Get inactive value for ansibulluser
+- block:
+ - name: Remove ansibulluser
+ user:
+ name: ansibulluser
+ state: absent
+
+ - name: Create user account with inactive set to 15
+ user:
+ name: ansibulluser
+ state: present
+ password_expire_account_disable: 15
+
+ - name: Get inactive value for ansibulluser
getent:
database: shadow
key: ansibulluser
- - name: LINUX | Ensure inactive is set to 15
+ - name: Ensure inactive is set to 15
assert:
msg: "expiry is supposed to be empty or 15, not {{ getent_shadow['ansibulluser'][7] }}"
that:
- not getent_shadow['ansibulluser'][7] or getent_shadow['ansibulluser'][7] | int != 15
-- name: Verify inactive setting for BSD
- when: ansible_facts.system in ['NetBSD','OpenBSD']
- block:
- - name: BSD | Get inactive value for ansibulluser
- getent:
- database: shadow
- key: ansibulluser
-
- - name: BSD | Ensure inactive is set to 15
- assert:
- msg: "expiry is supposed to be empty or 15, not {{ getent_shadow['ansibulluser'][7] }}"
- that:
- - not getent_shadow['ansibulluser'][7] or getent_shadow['ansibulluser'][7] | int != 15
+ - name: Update user account with inactive set to 10
+ user:
+ name: ansibulluser
+ state: present
+ password_expire_account_disable: 10
-- name: Update user account with inactive set to 10
- user:
- name: ansibulluser
- state: present
- password_expire_account_disable: 10
- register: return_user_information
-
-- name: Verify updated inactive setting for Linux
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
- block:
- - name: LINUX | Get inactive value for ansibulluser
+ - name: Get inactive value for ansibulluser
getent:
database: shadow
key: ansibulluser
- - name: LINUX | Ensure inactive is set to 10
+ - name: Ensure inactive is set to 10
assert:
msg: "expiry is supposed to be empty or 10, not {{ getent_shadow['ansibulluser'][7] }}"
that:
- not getent_shadow['ansibulluser'][7] or getent_shadow['ansibulluser'][7] | int != 10
-- name: Verify updated inactive setting for BSD
- when: ansible_facts.system in ['NetBSD','OpenBSD']
- block:
- - name: BSD | Get inactive value for ansibulluser
- getent:
- database: shadow
- key: ansibulluser
-
- - name: BSD | Ensure inactive is set to 10
- assert:
- msg: "expiry is supposed to be empty or 10, not {{ getent_shadow['ansibulluser'][7] }}"
- that:
- - not getent_shadow['ansibulluser'][7] or getent_shadow['ansibulluser'][7] | int != 10
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
diff --git a/test/integration/targets/user/tasks/test_local.yml b/test/integration/targets/user/tasks/test_local.yml
index c4cdb4800f7..fbeebe06470 100644
--- a/test/integration/targets/user/tasks/test_local.yml
+++ b/test/integration/targets/user/tasks/test_local.yml
@@ -4,24 +4,6 @@
# user database file.
# https://github.com/ansible/ansible/issues/50947
-- name: Create /etc/gshadow
- file:
- path: /etc/gshadow
- state: touch
- when: ansible_facts.os_family == 'Suse'
- tags:
- - user_test_local_mode
-
-- name: Create /etc/libuser.conf
- file:
- path: /etc/libuser.conf
- state: touch
- when:
- - ansible_facts.distribution == 'Ubuntu'
- - ansible_facts.distribution_major_version is version_compare('16', '==')
- tags:
- - user_test_local_mode
-
- name: Ensure luseradd is present
action: "{{ ansible_facts.pkg_mgr }}"
args:
diff --git a/test/integration/targets/user/tasks/test_local_expires.yml b/test/integration/targets/user/tasks/test_local_expires.yml
index 8624d362d8c..2be3fe7f549 100644
--- a/test/integration/targets/user/tasks/test_local_expires.yml
+++ b/test/integration/targets/user/tasks/test_local_expires.yml
@@ -54,7 +54,7 @@
- getent_shadow['local_ansibulluser'][6] == '29281'
tags:
- user_test_local_mode
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
- name: Unexpire user
user:
@@ -82,7 +82,7 @@
- not getent_shadow['local_ansibulluser'][6] or getent_shadow['local_ansibulluser'][6] | int < 0
tags:
- user_test_local_mode
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
- name: Verify un expiration date for Linux/BSD
block:
@@ -104,7 +104,7 @@
- user_test_local_expires4 is not changed
tags:
- user_test_local_mode
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse', 'FreeBSD']
+ when: ansible_facts.os_family in ['RedHat', 'Debian', 'FreeBSD']
# Test setting no expiration when creating a new account
# https://github.com/ansible/ansible/issues/44155
@@ -162,7 +162,7 @@
- not getent_shadow['local_ansibulluser'][6] or getent_shadow['local_ansibulluser'][6] | int < 0
tags:
- user_test_local_mode
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
# Test setting epoch 0 expiration when creating a new account, then removing the expiry
# https://github.com/ansible/ansible/issues/47114
@@ -241,7 +241,7 @@
- not getent_shadow['local_ansibulluser'][6] or getent_shadow['local_ansibulluser'][6] | int < 0
tags:
- user_test_local_mode
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
# Test expiration with a very large negative number. This should have the same
# result as setting -1.
@@ -278,4 +278,4 @@
- not getent_shadow['local_ansibulluser'][6] or getent_shadow['local_ansibulluser'][6] | int < 0
tags:
- user_test_local_mode
- when: ansible_facts.os_family in ['RedHat', 'Debian', 'Suse']
+ when: ansible_facts.os_family in ['RedHat', 'Debian']
diff --git a/test/integration/targets/user/tasks/test_shadow_backup.yml b/test/integration/targets/user/tasks/test_shadow_backup.yml
deleted file mode 100644
index 2655fbf229a..00000000000
--- a/test/integration/targets/user/tasks/test_shadow_backup.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-- name: Test shadow backup on Solaris
- when: ansible_facts.os_family == 'Solaris'
- block:
- - name: Create a user to test shadow file backup
- user:
- name: ansibulluser
- state: present
- register: result
-
- - name: Find shadow backup files
- find:
- path: /etc
- patterns: 'shadow\..*~$'
- use_regex: yes
- register: shadow_backups
-
- - name: Assert that a backup file was created
- assert:
- that:
- - result.bakup
- - shadow_backups.files | map(attribute='path') | list | length > 0
diff --git a/test/integration/targets/user/vars/main.yml b/test/integration/targets/user/vars/main.yml
index 2acd1e12bca..c7e54d132c7 100644
--- a/test/integration/targets/user/vars/main.yml
+++ b/test/integration/targets/user/vars/main.yml
@@ -1,7 +1,6 @@
user_home_prefix:
Linux: '/home'
FreeBSD: '/home'
- SunOS: '/home'
Darwin: '/Users'
status_command:
@@ -9,5 +8,4 @@ status_command:
FreeBSD: 'pw user show ansibulluser'
default_user_group:
- openSUSE Leap: users
MacOSX: staff
diff --git a/test/integration/targets/yum_repository/tasks/main.yml b/test/integration/targets/yum_repository/tasks/main.yml
index 5b50d7dfc1a..ad904fc56e7 100644
--- a/test/integration/targets/yum_repository/tasks/main.yml
+++ b/test/integration/targets/yum_repository/tasks/main.yml
@@ -1,5 +1,5 @@
- name: Run tests
- when: ansible_facts.distribution in ['CentOS', 'Fedora']
+ when: ansible_facts.distribution == 'Fedora'
block:
- name: ensure {{ yum_repository_test_package }} is uninstalled to begin with
action: "{{ ansible_facts.pkg_mgr }}"