From 110cb8966312e99230f0f610bf5efbf564a40fd0 Mon Sep 17 00:00:00 2001 From: dbrennand <52419383+dbrennand@users.noreply.github.com> Date: Sat, 23 Nov 2024 17:13:20 +0000 Subject: [PATCH] fix: https://github.com/geerlingguy/ansible-role-docker/issues/470 --- tasks/setup-Debian.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index 53ee5e5..a1c7d3e 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -4,6 +4,11 @@ path: /etc/apt/trusted.gpg.d/docker.asc state: absent +- name: Ensure old apt source list is not present in /etc/apt/sources.list.d + ansible.builtin.file: + path: /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list + state: absent + - name: Ensure the repo referencing the previous trusted.gpg.d key is not present apt_repository: repo: "deb [arch={{ docker_apt_arch }} signed-by=/etc/apt/trusted.gpg.d/docker.asc] {{ docker_repo_url }}/{{ docker_apt_ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" @@ -30,13 +35,13 @@ file: path: /etc/apt/keyrings state: directory - mode: '0755' + mode: "0755" - name: Add Docker apt key. ansible.builtin.get_url: url: "{{ docker_apt_gpg_key }}" dest: /etc/apt/keyrings/docker.asc - mode: '0644' + mode: "0644" force: false checksum: "{{ docker_apt_gpg_key_checksum | default(omit) }}" register: add_repository_key