Opened 4 weeks ago

Last modified 4 weeks ago

#13490 accepted Patch - Feature

Ansible patch for epel detection and installation for epel7 and epel8

Reported by: Gary Buhrmaster Owned by: Stuart Auchterlonie
Priority: minor Milestone: 31.0
Component: Ansible Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

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"

Change History (1)

comment:1 Changed 4 weeks ago by Stuart Auchterlonie

Component: MythTV - GeneralAnsible
Milestone: needs_triage31.0
Owner: set to Stuart Auchterlonie
Status: newaccepted
Version: UnspecifiedMaster Head
Note: See TracTickets for help on using tickets.