Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Problem: pulp_installer fails to enable the "powertools"
Browse files Browse the repository at this point in the history
repo on CentOS 8.3 or the new CentOS Stream

Solution: Enable it or "PowerTools".
Replacing the "Stream-PowerTools" repo.

fixes: #7996
  • Loading branch information
mikedep333 committed Dec 14, 2020
1 parent 82a168f commit 3ace0d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGES/7996.bugfix
@@ -0,0 +1,2 @@
Fixed inability to install on CentOS 8.3 or CentOS Stream due to the newly renamed "powertools" repo
(formerly "PowerTools") not being enabled by the installer.
13 changes: 5 additions & 8 deletions roles/pulp_common/tasks/repos.yml
Expand Up @@ -88,7 +88,7 @@
- name: Enable the CentOS PowerTools repo
block:

- name: Determine which file in /etc/yum.repos.d/ has the CentOS PowerTools repo
- name: Determine which file in /etc/yum.repos.d/ has the CentOS 8.0 to 8.2 PowerTools repo
shell: grep -l -E "^\[PowerTools\]" /etc/yum.repos.d/*.repo
register: repo_file
changed_when: false
Expand All @@ -105,20 +105,17 @@
when: repo_file.rc == 0
become: true

# Note: We can safely assume there will be no file with it if we are not on
# CentOS Stream. The RPM centos-release-stream adds several .repo files like:
# CentOS-Stream-PowerTools.repo
- name: Determine which file in /etc/yum.repos.d/ has the CentOS Stream-PowerTools repo
shell: grep -l -E "^\[Stream-PowerTools\]" /etc/yum.repos.d/*.repo
- name: Determine which file in /etc/yum.repos.d/ has the CentOS 8.3+ or Stream powertools repo
shell: grep -l -E "^\[powertools\]" /etc/yum.repos.d/*.repo
register: repo_file
changed_when: false
failed_when: false
check_mode: False

- name: Enable the CentOS Stream-PowerTools PowerTools repo
- name: Enable the CentOS powertools repo
ini_file:
path: "{{ repo_file.stdout }}"
section: "Stream-PowerTools"
section: "powertools"
option: enabled
value: 1
no_extra_spaces: true
Expand Down

0 comments on commit 3ace0d2

Please sign in to comment.