Skip to content

Commit 2e25891

Browse files
committed
Update TASK [Install | EPEL Repository]
Instead of installing the "epel-release" package from the СentOS repository, download and install this rpm package from site http://dl.fedoraproject.org This is necessary to support the RedHat family distributions.
1 parent ea6cd64 commit 2e25891

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tasks/add-repository.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,19 @@
3030
when: yum_repository length > 0
3131

3232
# Install Epel Repository
33-
- name: Install | EPEL Repository
33+
- name: "install | get epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
34+
get_url:
35+
url: "http://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
36+
dest: /tmp/
37+
timeout: 30
38+
validate_certs: no
39+
when: install_epel_repo == "true"
40+
tags: install_epel_repo
41+
42+
- name: install | EPEL repository
3443
package:
35-
name: epel-release
44+
name: "/tmp/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
45+
state: present
3646
when: install_epel_repo == "true"
3747
tags: install_epel_repo
3848

0 commit comments

Comments
 (0)