Skip to content

Commit d858c09

Browse files
committed
fix ood repos not having x.y releasever
1 parent 537199e commit d858c09

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

roles/builder/defaults/main/dnf_packages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ dnf_release_packages: # list of ansible.builtin.dnf args for packages to install
1616
- name: https://yum.osc.edu/ondemand/2.0/ondemand-release-web-2.0-1.noarch.rpm # https://github.com/OSC/ood-ansible/blob/master/defaults/main/install.yml:rpm_repo_url
1717
disable_gpg_check: yes
1818

19+
dnf_repofiles_no_minor_releasever: # list of repofiles which can't cope with an X.Y releasever
20+
- /etc/yum.repos.d/ondemand-web.repo
21+
1922
dnf_latest_packages: # list of packages to install using dnf
2023

2124
# https://github.com/stackhpc/ansible-role-openhpc/blob/master/vars/ohpc-2

roles/builder/tasks/dnf_packages.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
dnf: "{{ item }}"
55
loop: "{{ dnf_release_packages }}"
66

7+
- name: Remove minor releasever from repofiles
8+
ansible.builtin.replace:
9+
path: "{{ item }}"
10+
regexp: '\$releasever'
11+
replace: "{{ releasever | split('.') | first }}"
12+
when: "'.' in releasever"
13+
loop: "{{ dnf_repofiles_no_minor_releasever }}"
14+
715
- name: Install latest dnf packages
816
dnf:
917
name: "{{ dnf_latest_packages }}"

0 commit comments

Comments
 (0)