From dd7681c272a5f21077371f6934ce48d7d01f1218 Mon Sep 17 00:00:00 2001 From: k8s-infra-cherrypick-robot <90416843+k8s-infra-cherrypick-robot@users.noreply.github.com> Date: Tue, 21 May 2024 04:28:05 -0700 Subject: [PATCH] Remove the archived debian apt repository (#11220) Signed-off-by: Kay Yan Co-authored-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 cf81ce2b1..e2c4f82c4 100644 --- a/roles/container-engine/docker/tasks/main.yml +++ b/roles/container-engine/docker/tasks/main.yml @@ -66,6 +66,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 }}"