﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
13490	Ansible patch for epel detection and installation for epel7 and epel8	Gary Buhrmaster	Stuart Auchterlonie	"Ansible patch for epel version agnostic detection and installation of appropriate major version epel release.

(Lightly) tested with CentOS 7 and CentOS 8.

Note: CentOS 8 is still missing multiple packages in epel8 (requests for those packages are in various stages of progress), but this patch will be necessary as a supporting update.

Note: Sorry for the choice of component for the ticket, there is no ansible component in the list.


Patch follows:

{{{
diff --git a/roles/mythtv-dnf/tasks/setup-epel.yml b/roles/mythtv-dnf/tasks/setup-epel.yml
index 572e371..cfd5b26 100644
--- a/roles/mythtv-dnf/tasks/setup-epel.yml
+++ b/roles/mythtv-dnf/tasks/setup-epel.yml
@@ -1,6 +1,6 @@
 # roles/mythtv-rpm/tasks/setup-epel.yml
 
-- shell:            /bin/rpm -q --quiet epel-release-7 && echo installed || echo missing
+- shell:            /bin/rpm -q --quiet epel-release && echo installed || echo missing
   register:         epel
 
 - name: setup EPEL repository
diff --git a/roles/mythtv-dnf/vars/main.yml b/roles/mythtv-dnf/vars/main.yml
index dae889c..db8ec2c 100644
--- a/roles/mythtv-dnf/vars/main.yml
+++ b/roles/mythtv-dnf/vars/main.yml
@@ -1,6 +1,6 @@
 # roles/mythtv-rpm/vars/main.yml
 
-epel_rpm: ""http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm""
+epel_rpm: ""https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm""
 
 rpmfusion_rpm: ""http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ ansible_distribution_major_version }}.noarch.rpm""
 rpmfusion_rawhide_rpm: ""http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm""
}}}"	Patch - Feature	closed	minor	31.0	Ansible	Master Head	medium	Fixed			0
