Use distro release and Debian arch for the Docker apt repo

The repo line was hard-coded to bookworm/arm64 as a workaround before Docker published trixie packages. Derive it from ansible_distribution_release and map ansible_architecture to the Debian architecture name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lhahnandClaude Opus 5.5 committed 2026-10-14 17:23:00 +02:00
1 parent 30b9f8cf29
commit ebe85e2989
2 files changed
+6 -2

No files matched your search

+2 -2
View File
@@ -24,9 +24,9 @@
dest: /etc/apt/keyrings/docker.asc
mode: '0644'
- name: Add Docker repository for Debian 13 (use bookworm)
- name: Add Docker repository
apt_repository:
repo: "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian bookworm stable"
repo: "deb [arch={{ docker_apt_arch[ansible_architecture] | default(ansible_architecture) }} signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
state: present
filename: docker