diff --git a/tasks/centos/main.yml b/tasks/centos/main.yml index db779dbbad451920849e8df0be6507caacad80d3..1195a8b3d1d76da455f32b3df20827c38290d682 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'