Skip to content
Snippets Groups Projects
Commit e0ff9a02 authored by Bartosz Bezak's avatar Bartosz Bezak
Browse files

Fixes repositories files name in Rocky Linux 9

Distributions moved to lowercase names with RHEL 9 release.
This patch also removes previously created uppercase files.

Story: 2010637
Task: 47604
Change-Id: I8bf75ce44b9ec1fdd477fcddf2deebf2929d9fc1
parent f9fee1f1
No related branches found
No related tags found
No related merge requests found
---
- name: Copy CentOS repo templates
- name: Copy Rocky/CentOS repo templates
vars:
repo_file_prefix: "{{ ansible_facts.distribution }}{% if ansible_facts.distribution == 'CentOS'%}-Stream{% endif %}"
repo_file_prefix: "{{ ansible_facts.distribution | lower }}"
template:
src: "{{ item }}.j2"
dest: /etc/yum.repos.d/{{ item }}
......@@ -9,6 +9,18 @@
group: root
mode: 0664
become: True
loop:
- "{{ repo_file_prefix }}.repo"
- "{{ repo_file_prefix }}-extras.repo"
# TODO(bbezak): remove following task in B release
- name: Remove incorrect uppercase repo files
vars:
repo_file_prefix: "{{ ansible_facts.distribution }}{% if ansible_facts.distribution == 'CentOS'%}-Stream{% endif %}"
file:
path: /etc/yum.repos.d/{{ item }}
state: absent
become: True
loop:
- "{{ repo_file_prefix }}-AppStream.repo"
- "{{ repo_file_prefix }}-BaseOS.repo"
......
# CentOS-Stream-BaseOS.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client. You should use this for CentOS updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.
[baseos]
name=CentOS Stream $releasever - BaseOS
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
fastestmirror=0
# Rocky-BaseOS.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client. You should use this for Rocky updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.
[baseos]
name=Rocky Linux $releasever - BaseOS
baseurl=http://{{ dnf_rocky_mirror_host }}/{{ dnf_rocky_mirror_directory }}/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
# CentOS-Stream-AppStream.repo
# centos.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
......@@ -8,6 +8,14 @@
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.
[baseos]
name=CentOS Stream $releasever - BaseOS
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
fastestmirror=0
[appstream]
name=CentOS Stream $releasever - AppStream
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/AppStream/$basearch/os/
......
# Rocky-Extras.repo
# rocky-extras.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
......
# Rocky-AppStream.repo
# rocky.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
......@@ -8,6 +8,13 @@
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.
[baseos]
name=Rocky Linux $releasever - BaseOS
baseurl=http://{{ dnf_rocky_mirror_host }}/{{ dnf_rocky_mirror_directory }}/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
[appstream]
name=Rocky Linux $releasever - AppStream
baseurl=http://{{ dnf_rocky_mirror_host }}/{{ dnf_rocky_mirror_directory }}/$releasever/AppStream/$basearch/os/
......
---
fixes:
- |
Fixes repositories files names in Rocky Linux 9. Distributions moved to
lowercase names with RHEL 9 release.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment