From d4ea4f732017c06b76a6ea61738a80a85ddaedd6 Mon Sep 17 00:00:00 2001
From: zimniy <zimniy@cyberbrain.pw>
Date: Tue, 1 Jun 2021 16:29:22 +0300
Subject: [PATCH] "OracleLinux"

---
 tasks/centos/main.yml | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tasks/centos/main.yml b/tasks/centos/main.yml
index db779db..1195a8b 100644
--- a/tasks/centos/main.yml
+++ b/tasks/centos/main.yml
@@ -1,8 +1,15 @@
 ---
 
-- name: Enable EPEL repo
+- name: Enable EPEL repo with standard package
   dnf:
     name: epel-release
     state: present
     update_cache: yes
-  when: apply_epel is defined and apply_epel
+  when: apply_epel is defined and apply_epel and (ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux')
+
+- name: Enable EPEL repo with external package
+  dnf:
+    name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
+    state: present
+    update_cache: yes
+  when: apply_epel is defined and apply_epel and ansible_distribution == 'OracleLinux'
-- 
GitLab