CentOS Stream: update DNF repo file names
CentOS repositories were renamed following the separation of CentOS Linux and Stream. This change updates their names when using a local mirror. It also removes the old files. Change-Id: Ifcc3781d771e150b5771f2bf20cd8bcbc5faa443 Story: 2008795 Task: 42435
This commit is contained in:
parent
4daf293e78
commit
ece41b7a67
@ -7,6 +7,16 @@
|
||||
group: root
|
||||
mode: 0664
|
||||
become: True
|
||||
loop:
|
||||
- CentOS-Stream-AppStream.repo
|
||||
- CentOS-Stream-BaseOS.repo
|
||||
- CentOS-Stream-Extras.repo
|
||||
|
||||
- name: Remove old (pre CentOS 8.3) repo files
|
||||
file:
|
||||
path: /etc/yum.repos.d/{{ item }}
|
||||
state: absent
|
||||
become: True
|
||||
loop:
|
||||
- CentOS-AppStream.repo
|
||||
- CentOS-Base.repo
|
||||
|
@ -1,19 +0,0 @@
|
||||
# CentOS-AppStream.repo
|
||||
#
|
||||
# The mirror system uses the connecting IP address of the client and the
|
||||
# update status of each mirror to pick mirrors that are updated to and
|
||||
# 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, as a fall back you can try the
|
||||
# remarked out baseurl= line instead.
|
||||
#
|
||||
#
|
||||
|
||||
[AppStream]
|
||||
name=CentOS-$releasever - AppStream
|
||||
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$releasever/AppStream/$basearch/os/
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
fastestmirror=0
|
@ -1,19 +0,0 @@
|
||||
# CentOS-Base.repo
|
||||
#
|
||||
# The mirror system uses the connecting IP address of the client and the
|
||||
# update status of each mirror to pick mirrors that are updated to and
|
||||
# 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, as a fall back you can try the
|
||||
# remarked out baseurl= line instead.
|
||||
#
|
||||
#
|
||||
|
||||
[BaseOS]
|
||||
name=CentOS-$releasever - Base
|
||||
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$releasever/BaseOS/$basearch/os/
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
fastestmirror=0
|
@ -1,20 +0,0 @@
|
||||
# CentOS-Extras.repo
|
||||
#
|
||||
# The mirror system uses the connecting IP address of the client and the
|
||||
# update status of each mirror to pick mirrors that are updated to and
|
||||
# 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, as a fall back you can try the
|
||||
# remarked out baseurl= line instead.
|
||||
#
|
||||
#
|
||||
|
||||
#additional packages that may be useful
|
||||
[extras]
|
||||
name=CentOS-$releasever - Extras
|
||||
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$releasever/extras/$basearch/os/
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
fastestmirror=0
|
17
ansible/roles/dnf/templates/CentOS-Stream-AppStream.repo.j2
Normal file
17
ansible/roles/dnf/templates/CentOS-Stream-AppStream.repo.j2
Normal file
@ -0,0 +1,17 @@
|
||||
# CentOS-Stream-AppStream.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.
|
||||
|
||||
[appstream]
|
||||
name=CentOS Stream $releasever - AppStream
|
||||
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/AppStream/$basearch/os/
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
fastestmirror=0
|
17
ansible/roles/dnf/templates/CentOS-Stream-BaseOS.repo.j2
Normal file
17
ansible/roles/dnf/templates/CentOS-Stream-BaseOS.repo.j2
Normal file
@ -0,0 +1,17 @@
|
||||
# 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
|
17
ansible/roles/dnf/templates/CentOS-Stream-Extras.repo.j2
Normal file
17
ansible/roles/dnf/templates/CentOS-Stream-Extras.repo.j2
Normal file
@ -0,0 +1,17 @@
|
||||
# CentOS-Stream-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
|
||||
# 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.
|
||||
|
||||
[extras]
|
||||
name=CentOS Stream $releasever - Extras
|
||||
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/extras/$basearch/os/
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
fastestmirror=0
|
@ -171,7 +171,7 @@ def test_ntp_clock_synchronized(host):
|
||||
assert "synchronized: yes" in status_output
|
||||
|
||||
|
||||
@pytest.mark.parametrize('repo', ["AppStream", "BaseOS", "Extras", "epel",
|
||||
@pytest.mark.parametrize('repo', ["appstream", "baseos", "extras", "epel",
|
||||
"epel-modular"])
|
||||
@pytest.mark.skipif(not _is_dnf(), reason="DNF only supported on CentOS 8")
|
||||
def test_dnf_local_package_mirrors(host, repo):
|
||||
|
Loading…
Reference in New Issue
Block a user