Opened 4 weeks ago

Last modified 4 weeks ago

#13492 accepted Patch - Feature

Ansible patch to enable PowerTools repo for 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 to enable the CentOS PowerTools? repo when installing EPEL (required per documentation due to EPEL dependencies).

Note: (as before) This should be considered just a preparatory patch (it is not sufficient, as packages from RH/CentOS and EPEL8 are still pending).

(Lightly) tested on CentOS 8 system.

Depends on: #13490 #13491

diff --git a/roles/mythtv-dnf/tasks/setup-epel.yml b/roles/mythtv-dnf/tasks/setup-epel.yml
index cfd5b26..18ad347 100644
--- a/roles/mythtv-dnf/tasks/setup-epel.yml
+++ b/roles/mythtv-dnf/tasks/setup-epel.yml
@@ -6,3 +6,11 @@
 - name: setup EPEL repository
   command: dnf install -y --nogpgcheck {{ epel_rpm }}
   when: epel.stdout == "missing"
+
+- name: check if CentOS PowerTools repo enabled
+  shell:            /usr/bin/dnf -q repolist --enabled PowerTools && echo disabled || echo enabled
+  register:         powertools
+
+- name: enable CentOS PowerTools repository for epel
+  command: dnf config-manager --set-enabled PowerTools
+  when: powertools.stdout == "disabled"

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
Note: See TracTickets for help on using tickets.