From ed2059395c6a29dafd57c374a319257f3bfdd54b Mon Sep 17 00:00:00 2001 From: Kay Yan Date: Tue, 16 Apr 2024 15:21:55 +0800 Subject: [PATCH] Remove the archived debian apt repository (#11088) Signed-off-by: Kay Yan --- roles/container-engine/docker/tasks/main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/roles/container-engine/docker/tasks/main.yml b/roles/container-engine/docker/tasks/main.yml index 2d5ba5e59..376ee0504 100644 --- a/roles/container-engine/docker/tasks/main.yml +++ b/roles/container-engine/docker/tasks/main.yml @@ -67,6 +67,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 + backup: yes + when: + - ansible_os_family == 'Debian' + - ansible_distribution_release == "buster" + - name: Ensure docker-ce repository is enabled apt_repository: repo: "{{ item }}"