mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-01-19 13:41:44 -03: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:
parent
5e54fd4da3
commit
502ba663c5
@ -60,16 +60,17 @@
|
||||
environment: "{{ proxy_env }}"
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
|
||||
# ref to https://github.com/kubernetes-sigs/kubespray/issues/11086
|
||||
- name: Remove the archived debian apt repository
|
||||
lineinfile:
|
||||
path: /etc/apt/sources.list
|
||||
regexp: 'buster-backports'
|
||||
state: absent
|
||||
# ref to https://github.com/kubernetes-sigs/kubespray/issues/11086 & 12424
|
||||
- name: Convert -backports sources to archive.debian.org for bullseye and older
|
||||
replace:
|
||||
path: "{{ item }}"
|
||||
regexp: '^(deb(?:-src)?\s+)(?:https?://)?(?:[^ ]+debian\.org)?([^ ]*/debian)(\s+{{ ansible_distribution_release }}-backports\b.*)'
|
||||
replace: '\1http://archive.debian.org/debian\3'
|
||||
backup: true
|
||||
loop: "{{ query('fileglob', '/etc/apt/sources.list') }}"
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
- ansible_distribution_release == "buster"
|
||||
- ansible_distribution_release in ['bullseye', 'buster']
|
||||
|
||||
- name: Ensure docker-ce repository is enabled
|
||||
apt_repository:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user