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:
1 parent
30b9f8cf29
commit
ebe85e2989
2 files changed
+6
-2
No files matched your search
+2
-2
@@ -24,9 +24,9 @@
|
|||||||
dest: /etc/apt/keyrings/docker.asc
|
dest: /etc/apt/keyrings/docker.asc
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- name: Add Docker repository for Debian 13 (use bookworm)
|
- name: Add Docker repository
|
||||||
apt_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
|
state: present
|
||||||
filename: docker
|
filename: docker
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
# ansible_architecture -> Debian package architecture
|
||||||
|
docker_apt_arch:
|
||||||
|
aarch64: arm64
|
||||||
|
x86_64: amd64
|
||||||
Reference in new issue
Block a user