network/tests/tasks/enable_epel.yml
Gris Ge b0f5d6352a test: Fix EL6 repo
* As EPEL6 has been moved to archive, created `tests/tasks/enable_epel.yml`.
 * As CentOS6 has been moved to vault, created `tests/tests_00_setup.yml`.

Signed-off-by: Gris Ge <fge@redhat.com>
2020-12-22 08:14:39 +08:00

24 lines
837 B
YAML

# SPDX-License-Identifier: BSD-3-Clause
---
- name: Enable EPEL {{ ansible_distribution_major_version }}
# yamllint disable-line rule:line-length
command: yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
args:
warn: false
creates: /etc/yum.repos.d/epel.repo
when:
- ansible_distribution in ['RedHat', 'CentOS']
- ansible_distribution_major_version in ['7', '8']
- 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
when:
- ansible_distribution in ['RedHat', 'CentOS']
- ansible_distribution_major_version == '6'