CI: Use archived RPMs on CentOS 8

CentOS 8 has reached EOL. Packages are no longer mirrored or maintained. A
historic snapshot of the packages is kept on vault.centos.org.

refs #1088, #1090
pull/1091/head
Alex Willmer 3 months ago
parent 23d9d0bc82
commit f5a8840668

@ -1,2 +1,3 @@
--- ---
pkg_mgr_python_interpreter: python pkg_mgr_python_interpreter: python
pkg_repos_overrides: []

@ -1,2 +1,28 @@
--- ---
pkg_mgr_python_interpreter: /usr/libexec/platform-python pkg_mgr_python_interpreter: /usr/libexec/platform-python
pkg_repos_overrides:
- dest: /etc/yum.repos.d/CentOS-Linux-AppStream.repo
content: |
[appstream]
name=CentOS Linux $releasever - AppStream
baseurl=http://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
- dest: /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
content: |
[baseos]
name=CentOS Linux $releasever - BaseOS
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
- dest: /etc/yum.repos.d/CentOS-Linux-Extras.repo
content: |
[extras]
name=CentOS Linux $releasever - Extras
baseurl=http://vault.centos.org/$contentdir/$releasever/extras/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

@ -0,0 +1,4 @@
pkg_repos_overrides:
- dest: /etc/apt/sources.list
content: |
deb http://archive.debian.org/debian stretch main contrib non-free

@ -10,21 +10,14 @@
ansible_python_interpreter: "{{ pkg_mgr_python_interpreter }}" ansible_python_interpreter: "{{ pkg_mgr_python_interpreter }}"
package: rsync # Chosen to exist in all tested distros/package managers package: rsync # Chosen to exist in all tested distros/package managers
tasks: tasks:
- name: Switch to centos-stream - name: Switch to archived package repositories
command: dnf --assumeyes --disablerepo="*" --enablerepo=extras swap centos-linux-repos centos-stream-repos
when:
- ansible_facts.pkg_mgr in ["dnf"]
- name: Switch to archive.debian.org
# Debian 9 has been archived https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html
copy: copy:
content: | dest: "{{ item.dest }}"
deb http://archive.debian.org/debian stretch main contrib non-free content: "{{ item.content }}"
dest: /etc/apt/sources.list
mode: u=rw,go=r mode: u=rw,go=r
when: loop: "{{ pkg_repos_overrides }}"
- ansible_facts.distribution == "Debian" loop_control:
- ansible_facts.distribution_major_version == "9" label: "{{ item.dest }}"
- name: Add signing keys - name: Add signing keys
copy: copy:

Loading…
Cancel
Save