From ebe85e2989ff0c3d02f888347b520d9de694cded Mon Sep 17 00:00:00 2001 From: lhahn Date: Wed, 14 Oct 2026 17:23:00 +0200 Subject: [PATCH] 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 --- tasks/main.yml | 4 ++-- vars/main.yml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index f58a45e..6ffbd58 100755 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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 diff --git a/vars/main.yml b/vars/main.yml index ed97d53..7d98a07 100755 --- a/vars/main.yml +++ b/vars/main.yml @@ -1 +1,5 @@ --- +# ansible_architecture -> Debian package architecture +docker_apt_arch: + aarch64: arm64 + x86_64: amd64