mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-08 09:57:38 -02:30
Fix: Convert -backports sources to archive.debian.org for bullseye and older (#12434)
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
This commit is contained in:
@@ -60,16 +60,17 @@
|
|||||||
environment: "{{ proxy_env }}"
|
environment: "{{ proxy_env }}"
|
||||||
when: ansible_pkg_mgr == 'apt'
|
when: ansible_pkg_mgr == 'apt'
|
||||||
|
|
||||||
# ref to https://github.com/kubernetes-sigs/kubespray/issues/11086
|
# ref to https://github.com/kubernetes-sigs/kubespray/issues/11086 & 12424
|
||||||
- name: Remove the archived debian apt repository
|
- name: Convert -backports sources to archive.debian.org for bullseye and older
|
||||||
lineinfile:
|
replace:
|
||||||
path: /etc/apt/sources.list
|
path: "{{ item }}"
|
||||||
regexp: 'buster-backports'
|
regexp: '^(deb(?:-src)?\s+)(?:https?://)?(?:[^ ]+debian\.org)?([^ ]*/debian)(\s+{{ ansible_distribution_release }}-backports\b.*)'
|
||||||
state: absent
|
replace: '\1http://archive.debian.org/debian\3'
|
||||||
backup: true
|
backup: true
|
||||||
|
loop: "{{ query('fileglob', '/etc/apt/sources.list') }}"
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == 'Debian'
|
- ansible_os_family == 'Debian'
|
||||||
- ansible_distribution_release == "buster"
|
- ansible_distribution_release in ['bullseye', 'buster']
|
||||||
|
|
||||||
- name: Ensure docker-ce repository is enabled
|
- name: Ensure docker-ce repository is enabled
|
||||||
apt_repository:
|
apt_repository:
|
||||||
|
|||||||
Reference in New Issue
Block a user