Skip to content

Commit 3e6ecd6

Browse files
committed
tests: Enable EPEL on EL 7 to install hostapd
Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
1 parent 7f13318 commit 3e6ecd6

2 files changed

Lines changed: 23 additions & 6 deletions

File tree

tests/tasks/setup_802_1x_server.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44
debug:
55
msg: facts {{ ansible_facts | to_nice_json }}
66

7-
# This task can be removed once the RHEL-8.5 is not tested anymore
8-
- name: Install hostapd via CentOS Stream
9-
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]
7+
- name: Setup epel on EL 7
108
when:
11-
- ansible_facts['distribution_version'] is version('8.6', '<')
12-
- ansible_facts['distribution_major_version'] == '8'
139
- ansible_facts['distribution'] == 'RedHat'
14-
changed_when: false
10+
- ansible_facts['distribution_major_version'] == '7'
11+
yum_repository:
12+
name: epel
13+
description: Extra Packages for Enterprise Linux 7
14+
baseurl: https://archives.fedoraproject.org/pub/archive/epel/{{ ansible_facts['distribution_major_version'] }}/{{ ansible_facts['architecture'] }}/
15+
gpgcheck: 0
16+
enabled: 1
17+
skip_if_unavailable: 1
18+
state: present
1519

1620
- name: Install hostapd
1721
package:

tests/tasks/setup_mock_wifi.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22
---
3+
- name: Setup epel on EL 7
4+
when:
5+
- ansible_facts['distribution'] == 'RedHat'
6+
- ansible_facts['distribution_major_version'] == '7'
7+
yum_repository:
8+
name: epel
9+
description: Extra Packages for Enterprise Linux 7
10+
baseurl: https://archives.fedoraproject.org/pub/archive/epel/{{ ansible_facts['distribution_major_version'] }}/{{ ansible_facts['architecture'] }}/
11+
gpgcheck: 0
12+
enabled: 1
13+
skip_if_unavailable: 1
14+
state: present
15+
316
- name: Install packages required to set up mock wifi network
417
package:
518
name:

0 commit comments

Comments
 (0)