test: do not need to install from epel or pip

The tests should not install anything from outside of the distribution
unless absolutely necessary, like the copr repos.

All of the EPEL dependencies have been removed or replaced
with coprs.

We do not need to install pytest from pip since it is available
as `pytest-3` from `python3-pytest`.

We do not need `git` or `rsync` in the tests.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
This commit is contained in:
Rich Megginson 2025-03-12 15:20:33 -06:00 committed by Richard Megginson
parent 53be949a5b
commit e5aca936e5
7 changed files with 7 additions and 82 deletions

View file

@ -1,5 +1,3 @@
dbus-tools
git
network-scripts
python3-pip
rsync
python3-pytest

View file

@ -1,12 +1,10 @@
dbus-tools
ethtool
git
hostapd
NetworkManager
network-scripts
openssl
procps-ng
python3-pip
rsync
python3-pytest
systemd-resolved
wpa_supplicant

View file

@ -1,10 +1,8 @@
dbus-tools
ethtool
git
hostapd
NetworkManager
network-scripts
openssl
procps-ng
python3-pip
rsync
python3-pytest

View file

@ -4,9 +4,7 @@
hosts: all
vars:
rpmdependencies:
- git
- python3-pip
- rsync
- python3-pytest
tasks:
- name: Install rpm dependencies
@ -16,11 +14,6 @@
use: "{{ (__network_is_ostree | d(false)) |
ternary('ansible.posix.rhel_rpm_ostree', omit) }}"
- name: Install Pytest
command: "pip3 install pytest"
changed_when: false
# Import needed in order to install initscripts dependencies on the remote
# system.
- name: Import the playbook '../tests_default_initscripts.yml'
@ -135,7 +128,7 @@
block:
- name: Run pytest with nm
command: >
pytest
pytest-3
{{ _rundir.path }}/{{ tests_directory | basename }}/integration/
--provider=nm
register: playbook_run
@ -157,7 +150,7 @@
ternary('ansible.posix.rhel_rpm_ostree', omit) }}"
- name: Run pytest with initscripts
command: >
pytest
pytest-3
{{ _rundir.path }}/{{ tests_directory | basename }}/integration/
--provider=initscripts
register: playbook_run

View file

@ -9,7 +9,7 @@
register: __install_status
# sometimes the rpm download returns a 403 - I think it is when too
# many parallel jobs attempt the download from the same controller in
# too short a period of time, so the epel server throttles additional
# too short a period of time, so the server throttles additional
# downloads - use a retry here to mitigate
until: __install_status is success
retries: 6

View file

@ -50,6 +50,3 @@
when:
- ansible_distribution == 'CentOS'
- ansible_distribution_major_version == '6'
- name: Include the task 'enable_epel.yml'
include_tasks: enable_epel.yml
when: not __network_is_ostree | d(false)

View file

@ -1,59 +0,0 @@
# SPDX-License-Identifier: BSD-3-Clause
---
- name: Create EPEL yum repo and Enable EPEL
when:
- ansible_distribution in ['RedHat', 'CentOS']
- ansible_distribution_major_version in ['7', '8']
block:
- name: Create EPEL {{ ansible_distribution_major_version }}
vars:
__epel_7:
"https://dl.fedoraproject.org/pub/archive/epel/7/x86_64/\
Packages/e/epel-release-7-14.noarch.rpm"
__epel: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{
ansible_distribution_major_version }}.noarch.rpm
__epel_url: "{{
__epel_7 if ansible_distribution_major_version == '7'
else __epel }}"
command:
cmd: rpm -iv {{ __epel_url }}
# noqa command-instead-of-module
creates: /etc/yum.repos.d/epel.repo
register: __epel_status
# sometimes the rpm download returns a 403 - I think it is when too
# many parallel jobs attempt the download from the same controller in
# too short a period of time, so the epel server throttles additional
# downloads - use a retry here to mitigate
until: __epel_status is success
retries: 6
delay: 10
- name: Install yum-utils package
package:
state: present
name: yum-utils
when: ansible_distribution_major_version == '7'
- name: Enable EPEL 7
command: yum-config-manager --enable epel
when: ansible_distribution_major_version == '7'
changed_when: false
- name: Enable EPEL 8
command: dnf config-manager --set-enabled epel
when: ansible_distribution_major_version == '8'
changed_when: false
- name: Enable EPEL 6
copy:
dest: /etc/yum.repos.d/epel.repo
content: |
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=https://archives.fedoraproject.org/pub/archive/epel/6/$basearch
enabled=1
gpgcheck=0
mode: "0644"
when:
- ansible_distribution in ['RedHat', 'CentOS']
- ansible_distribution_major_version == '6'