fix: EL8+ uses same template file 🎨

This commit is contained in:
2024-08-18 21:56:06 +12:00
parent f1c5916252
commit babfb027db
3 changed files with 69 additions and 9 deletions

View File

@@ -48,21 +48,15 @@
- epel_specify_mirror
- ansible_os_family == "RedHat" and ansible_distribution_major_version == "7"
- name: Configure Repository Settings (EL8)
- name: Configure Repository Settings (EL8+))
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- src: el8-epel.repo.j2
- src: epel.repo.j2
dest: /etc/yum.repos.d/epel.repo
- src: el8-epel-modular.repo.j2
dest: /etc/yum.repos.d/epel-modular.repo
- src: el8-epel-playground.repo.j2
dest: /etc/yum.repos.d/epel-playground.repo
- src: el8-epel-testing.repo.j2
- src: epel-testing.repo.j2
dest: /etc/yum.repos.d/epel-testing.repo
- src: el8-epel-testing-modular.repo.j2
dest: /etc/yum.repos.d/epel-testing-modular.repo
when:
- epel_specify_mirror
- ansible_os_family == "RedHat" and ansible_distribution_major_version == "8"

View File

@@ -0,0 +1,33 @@
[epel-testing]
name=Extra Packages for Enterprise Linux $releasever - Testing - $basearch
{% if epel_specify_mirror is sameas true %}
baseurl={{ epel_mirror_url }}/testing/$releasever/Everything/$basearch
{% else %}
metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir
{% endif %}
enabled=0
gpgcheck=1
countme=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version}}
[epel-testing-debuginfo]
name=Extra Packages for Enterprise Linux $releasever - Testing - $basearch - Debug
{% if epel_specify_mirror is sameas true %}
baseurl={{ epel_mirror_url }}/testing/$releasever/Everything/$basearch/debug
{% else %}
metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir
{% endif %}
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version}}
gpgcheck=1
[epel-testing-source]
name=Extra Packages for Enterprise Linux $releasever - Testing - $basearch - Source
{% if epel_specify_mirror is sameas true %}
baseurl={{ epel_mirror_url }}/testing/$releasever/Everything/SRPMS
{% else %}
metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir
{% endif %}
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version}}
gpgcheck=1

33
templates/epel.repo.j2 Normal file
View File

@@ -0,0 +1,33 @@
[epel]
name=Extra Packages for Enterprise Linux $releasever - $basearch
{% if epel_specify_mirror is sameas true %}
baseurl={{ epel_mirror_url }}/$releasever/Everything/$basearch
{% else %}
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch&infra=$infra&content=$contentdir
{% endif %}
enabled=1
gpgcheck=1
countme=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}
[epel-debuginfo]
name=Extra Packages for Enterprise Linux $releasever - $basearch - Debug
{% if epel_specify_mirror is sameas true %}
baseurl={{ epel_mirror_url }}/$releasever/Everything/$basearch/debug
{% else %}
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-$releasever&arch=$basearch&infra=$infra&content=$contentdir
{% endif %}
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux $releasever - $basearch - Source
{% if epel_specify_mirror %}
baseurl={{ epel_mirror_url }}/$releasever/Everything/SRPMS
{% else %}
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-$releasever&arch=$basearch&infra=$infra&content=$contentdir
{% endif %}
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}
gpgcheck=1