Skip to content

Commit 6cb7fe0

Browse files
committed
common: use EPEL metalink
Some mirrors are stale (https://pagure.io/fedora-infrastructure/issue/11233) Use MirrorManager's metalink application so we always get up-to-date mirrors. MirrorManager will also return the list of mirror that carry each architecture (x86_64, aarch64, etc) so we will not need to manage that information ourselves here.
1 parent 768122f commit 6cb7fe0

File tree

4 files changed

+2
-31
lines changed

4 files changed

+2
-31
lines changed

roles/common/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ epel_mirror_baseurl: "http://dl.fedoraproject.org/pub/epel"
1717
epel_repos:
1818
epel:
1919
name: "Extra Packages for Enterprise Linux"
20-
mirrorlist: file:///etc/yum.repos.d/epel-mirrorlist
20+
metalink: "https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch&infra=$infra&content=$contentdir"
2121
# ternary requires ansible >= 1.9
2222
enabled: "{{ enable_epel | ternary(1, 0) }}"
2323
gpgcheck: 0
2424
epel-testing:
2525
name: "Extra Packages for Enterprise Linux - Testing"
26-
mirrorlist: file:///etc/yum.repos.d/epel-testing-mirrorlist
26+
metalink: "https://mirrors.fedoraproject.org/metalink?repo=testing-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir"
2727
enabled: 0
2828
gpgcheck: 0
2929

roles/common/tasks/epel.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@
1616
register: epel_repo
1717
with_dict: "{{ epel_repos }}"
1818

19-
- name: Configure local epel mirrorlists
20-
template:
21-
src: '{{ item }}'
22-
dest: '/etc/yum.repos.d/{{ item }}'
23-
owner: root
24-
group: root
25-
mode: 0644
26-
with_items:
27-
- epel-mirrorlist
28-
- epel-testing-mirrorlist
29-
3019
- name: Clean yum cache
3120
shell: yum clean all
3221
when: epel_repo is defined and epel_repo is changed

roles/common/templates/epel-mirrorlist

Lines changed: 0 additions & 9 deletions
This file was deleted.

roles/common/templates/epel-testing-mirrorlist

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)