Skip to content

Commit 1c760c3

Browse files
authored
Merge pull request #77 from stackhpc/fix/centos8.3
fix powertools repo path on centos 8.3
2 parents 4eb3e59 + c8b987c commit 1c760c3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
matrix:
1616
image:
1717
- 'centos:8.2.2004'
18+
- 'centos:8.3.2011'
1819
- 'centos:7'
1920
scenario:
2021
- test1

tasks/install.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@
1919
include_vars:
2020
file: "ohpc-{{ ansible_facts.packages['ohpc-release'][0]['version'] }}"
2121

22+
- name: Find CentOS8 PowerTools repo
23+
find:
24+
paths: /etc/yum.repos.d
25+
patterns: CentOS-*PowerTools.repo
26+
register: powertools
27+
when: ansible_distribution_major_version == "8"
28+
2229
- name: Enable CentOS8 PowerTools repo
2330
# NB: doesn't run command `dnf config-manager --set-enabled PowerTools` as can't make that idempotent
2431
lineinfile:
25-
path: /etc/yum.repos.d/CentOS-PowerTools.repo
32+
path: "{{ powertools.files[0].path }}" # 8.2: /etc/yum.repos.d/CentOS-PowerTools.repo 8.3: /etc/yum.repos.d/CentOS-Linux-PowerTools.repo
2633
create: false # raises error if not already installed
2734
regexp: enabled=
2835
line: enabled=1

0 commit comments

Comments
 (0)