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
This commit is contained in:
parent
f9fee1f17f
commit
e0ff9a0283
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Copy CentOS repo templates
|
- name: Copy Rocky/CentOS repo templates
|
||||||
vars:
|
vars:
|
||||||
repo_file_prefix: "{{ ansible_facts.distribution }}{% if ansible_facts.distribution == 'CentOS'%}-Stream{% endif %}"
|
repo_file_prefix: "{{ ansible_facts.distribution | lower }}"
|
||||||
template:
|
template:
|
||||||
src: "{{ item }}.j2"
|
src: "{{ item }}.j2"
|
||||||
dest: /etc/yum.repos.d/{{ item }}
|
dest: /etc/yum.repos.d/{{ item }}
|
||||||
@ -9,6 +9,18 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: 0664
|
mode: 0664
|
||||||
become: True
|
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:
|
loop:
|
||||||
- "{{ repo_file_prefix }}-AppStream.repo"
|
- "{{ repo_file_prefix }}-AppStream.repo"
|
||||||
- "{{ repo_file_prefix }}-BaseOS.repo"
|
- "{{ repo_file_prefix }}-BaseOS.repo"
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
# 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
|
|
@ -1,16 +0,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
|
|
@ -1,4 +1,4 @@
|
|||||||
# CentOS-Stream-AppStream.repo
|
# centos.repo
|
||||||
#
|
#
|
||||||
# The mirrorlist system uses the connecting IP address of the client and the
|
# 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
|
# 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
|
# If the mirrorlist does not work for you, you can try the commented out
|
||||||
# baseurl line instead.
|
# 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]
|
[appstream]
|
||||||
name=CentOS Stream $releasever - AppStream
|
name=CentOS Stream $releasever - AppStream
|
||||||
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/AppStream/$basearch/os/
|
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/AppStream/$basearch/os/
|
@ -1,4 +1,4 @@
|
|||||||
# Rocky-Extras.repo
|
# rocky-extras.repo
|
||||||
#
|
#
|
||||||
# The mirrorlist system uses the connecting IP address of the client and the
|
# 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
|
# update status of each mirror to pick current mirrors that are geographically
|
@ -1,4 +1,4 @@
|
|||||||
# Rocky-AppStream.repo
|
# rocky.repo
|
||||||
#
|
#
|
||||||
# The mirrorlist system uses the connecting IP address of the client and the
|
# 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
|
# 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
|
# If the mirrorlist does not work for you, you can try the commented out
|
||||||
# baseurl line instead.
|
# 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]
|
[appstream]
|
||||||
name=Rocky Linux $releasever - AppStream
|
name=Rocky Linux $releasever - AppStream
|
||||||
baseurl=http://{{ dnf_rocky_mirror_host }}/{{ dnf_rocky_mirror_directory }}/$releasever/AppStream/$basearch/os/
|
baseurl=http://{{ dnf_rocky_mirror_host }}/{{ dnf_rocky_mirror_directory }}/$releasever/AppStream/$basearch/os/
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes repositories files names in Rocky Linux 9. Distributions moved to
|
||||||
|
lowercase names with RHEL 9 release.
|
Loading…
Reference in New Issue
Block a user