Remove both historical one-line Docker sources
A leftover one-liner and the deb822 source set different signed-by values for the same repository, which apt rejects outright.
Assisted-by: GLM-5.3 via pi
diff --git a/lotus-land-story/main.yml b/lotus-land-story/main.yml
index 7446542..8e41e3c 100644
--- a/lotus-land-story/main.yml
+++ b/lotus-land-story/main.yml
@@ -58,7 +58,6 @@
- import_playbook: ../playbooks/tailscale.yml # noqa: name[play]
- import_playbook: ../playbooks/docker.yml # noqa: name[play]
-# TODO consolidate this into the other playbook?
- import_playbook: docker.yml # noqa: name[play]
- import_playbook: postgres.yml # noqa: name[play]
diff --git a/lotus-land-story/templates/docker.list b/lotus-land-story/templates/docker.list
deleted file mode 100644
index 8840d81..0000000
--- a/lotus-land-story/templates/docker.list
+++ /dev/null
@@ -1 +0,0 @@
-deb [arch="{{ arch.stdout }}" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable
diff --git a/playbooks/docker.yml b/playbooks/docker.yml
index 60094d0..9a85b4d 100644
--- a/playbooks/docker.yml
+++ b/playbooks/docker.yml
@@ -31,12 +31,15 @@
register: dpkg_arch
changed_when: false
- # Left behind by ansible.builtin.apt_repository; apt reads both formats, so
- # leaving it would configure the repository twice.
- - name: Remove one-line Docker repository
+ # Left behind by earlier runs: apt reads both formats, and a one-liner
+ # with a different signed-by for the same repository breaks apt outright.
+ - name: Remove one-line Docker repositories
ansible.builtin.file:
- path: /etc/apt/sources.list.d/download_docker_com_linux_debian.list
+ path: /etc/apt/sources.list.d/{{ item }}
state: absent
+ loop:
+ - download_docker_com_linux_debian.list
+ - docker.list
# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \
# https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \