Skip to content

Commit a9e6959

Browse files
committed
add epel
1 parent 86f93ed commit a9e6959

File tree

3 files changed

+29
-68
lines changed

3 files changed

+29
-68
lines changed

ansible/roles/dnf_repos/defaults/main.yml

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,3 @@ dnf_repos_extra: {}
33
dnf_repos_pulp_content_url: "{{ appliances_pulp_url }}/pulp/content"
44
dnf_repos_username: "{{ omit }}"
55
dnf_repos_password: "{{ omit }}"
6-
7-
dnf_repos_filenames:
8-
'8':
9-
baseos: 'Rocky-BaseOS'
10-
appstream: 'Rocky-AppStream'
11-
crb: 'Rocky-PowerTools'
12-
extras: 'Rocky-Extras'
13-
grafana: 'grafana'
14-
'9':
15-
baseos: 'rocky'
16-
appstream: 'rocky'
17-
crb: 'rocky'
18-
extras: 'rocky-extras'
19-
grafana: 'grafana'
20-
21-
dnf_repos_version_filenames: "{{ dnf_repos_filenames[ansible_distribution_major_version] }}"
22-
23-
# epel installed separately
24-
dnf_repos_default_repolist:
25-
- file: "{{ dnf_repos_version_filenames.baseos }}"
26-
name: baseos
27-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.baseos[ansible_distribution_version] | appliances_repo_to_subpath }}"
28-
- file: "{{ dnf_repos_version_filenames.appstream }}"
29-
name: appstream
30-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.appstream[ansible_distribution_version] | appliances_repo_to_subpath }}"
31-
- file: "{{ dnf_repos_version_filenames.crb }}"
32-
name: "{{ 'powertools' if ansible_distribution_major_version == '8' else 'crb' }}"
33-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.crb[ansible_distribution_version] | appliances_repo_to_subpath }}"
34-
- file: "{{ dnf_repos_version_filenames.extras }}"
35-
name: extras
36-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.extras[ansible_distribution_version] | appliances_repo_to_subpath }}"
37-
- file: ceph
38-
name: Ceph
39-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.ceph[ansible_distribution_major_version] | appliances_repo_to_subpath }}"
40-
- file: "{{ dnf_repos_version_filenames.grafana }}"
41-
name: grafana
42-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.grafana[ansible_distribution_major_version] | appliances_repo_to_subpath }}"
43-
44-
dnf_repos_openhpc_repolist:
45-
- name: OpenHPC
46-
file: OpenHPC
47-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.openhpc_base[ansible_distribution_major_version] | appliances_repo_to_subpath }}"
48-
- name: OpenHPC-updates
49-
file: OpenHPC
50-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.openhpc_updates[ansible_distribution_major_version] | appliances_repo_to_subpath }}"
51-
52-
dnf_repos_extra_repolist: []
53-
dnf_repos_repolist: "{{ dnf_repos_default_repolist + (dnf_repos_openhpc_repolist if (openhpc_install_type | default('ohpc')) == 'ohpc' else []) + dnf_repos_extra_repolist }}"
54-
55-
dnf_repos_epel_baseurl: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.epel[ansible_distribution_major_version] | appliances_repo_to_subpath }}"
56-
dnf_repos_epel_description: "epel"

ansible/roles/dnf_repos/tasks/set_repos.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,27 @@
1818
repo_name: "{{ repo_values.repo_name | default(item.key) }}"
1919
repo_content_url: "{{ repo_values.pulp_content_url | default(dnf_repos_pulp_content_url) }}"
2020

21-
- meta: end_here
22-
2321
- name: Install epel-release
24-
# done so that roles installing epel via epel-release don't over-write our changes to the epel repo
22+
# So roles installing epel via epel-release don't overwrite changes to the epel repo below
2523
ansible.builtin.dnf:
2624
name: epel-release
2725

28-
# TODO: FIXME
29-
- name: Use Pulp EPEL repo
26+
- name: Replace epel repo with Pulp repo
3027
ansible.builtin.yum_repository:
31-
name: epel
32-
file: epel
33-
description: "{{ dnf_repos_epel_description }}"
34-
gpgcheck: false
35-
baseurl: "{{ dnf_repos_epel_baseurl }}"
28+
file: "{{ repo_values.repo_file }}"
29+
name: "{{ repo_name }}"
30+
baseurl: "{{ repo_content_url }}/{{ repo_values.pulp_path }}/{{ repo_values.pulp_timestamp }}"
31+
description: "{{ repo_name }}"
3632
username: "{{ dnf_repos_username }}"
3733
password: "{{ dnf_repos_password }}"
34+
gpgcheck: false # TODO: is this really false here and above??
35+
loop: "{{ dnf_repos_default_epel | dict2items }}"
36+
loop_control:
37+
label: "{{ repo_name }}[{{ repo_os }}]: {{ repo_values }}"
38+
vars:
39+
repo_os: "{{ ansible_distribution_version if ansible_distribution_version in item.value else ansible_distribution_major_version }}"
40+
repo_values: "{{ item.value[repo_os] }}"
41+
repo_name: "{{ repo_values.repo_name | default(item.key) }}"
42+
repo_content_url: "{{ repo_values.pulp_content_url | default(dnf_repos_pulp_content_url) }}"
43+
44+
- meta: end_here

environments/common/inventory/group_vars/all/timestamps.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,6 @@ dnf_repos_default:
6262
repo_file: rocky
6363
pulp_path: rocky/9.6/CRB/x86_64/os
6464
pulp_timestamp: 20250726T040613
65-
# epel:
66-
# '8':
67-
# path: epel/8/Everything/x86_64
68-
# timestamp: 20250615T234151
69-
# '9':
70-
# path: epel/9/Everything/x86_64
71-
# timestamp: 20250729T235750
7265
extras:
7366
'8.10':
7467
repo_file: Rocky-Extras
@@ -114,3 +107,15 @@ dnf_repos_default:
114107
repo_file: OpenHPC
115108
pulp_path: OpenHPC/3/updates/EL_9
116109
pulp_timestamp: 20250510T003301
110+
111+
dnf_repos_default_epel: # as for dnf_repos_default
112+
epel:
113+
'8':
114+
repo_file: epel
115+
pulp_path: epel/8/Everything/x86_64
116+
pulp_timestamp: 20250615T234151
117+
'9':
118+
repo_file: epel
119+
pulp_path: epel/9/Everything/x86_64
120+
pulp_timestamp: 20250729T235750
121+

0 commit comments

Comments
 (0)