tests: Enable EPEL on EL 7 to install hostapd

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
This commit is contained in:
Sergei Petrosian 2026-03-27 19:08:21 +01:00 committed by Richard Megginson
parent 397dd13753
commit 8a0e3a8e4e
2 changed files with 13 additions and 9 deletions

View file

@ -50,3 +50,16 @@
when:
- ansible_facts['distribution'] == 'CentOS'
- ansible_facts['distribution_major_version'] == '6'
- name: Setup epel on EL 7
when:
- ansible_facts['distribution'] == 'CentOS'
- ansible_facts['distribution_major_version'] == '7'
yum_repository:
name: epel
description: Extra Packages for Enterprise Linux 7
baseurl: https://archives.fedoraproject.org/pub/archive/epel/{{ ansible_facts['distribution_major_version'] }}/{{ ansible_facts['architecture'] }}/
gpgcheck: 0
enabled: 1
skip_if_unavailable: 1
state: present

View file

@ -4,15 +4,6 @@
debug:
msg: facts {{ ansible_facts | to_nice_json }}
# This task can be removed once the RHEL-8.5 is not tested anymore
- name: Install hostapd via CentOS Stream
command: dnf -y install http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/hostapd-2.10-1.el8.x86_64.rpm # noqa yaml[line-length]
when:
- ansible_facts['distribution_version'] is version('8.6', '<')
- ansible_facts['distribution_major_version'] == '8'
- ansible_facts['distribution'] == 'RedHat'
changed_when: false
- name: Install hostapd
package:
name: hostapd