added deb achitecture variable

This commit is contained in:
olli 2024-01-18 15:32:56 +01:00
parent c1cd8178bb
commit 4194f2f79e

View File

@ -90,9 +90,13 @@
state: absent
filename: docker
- name: Get DEB architecture
shell: dpkg --print-architecture
register: deb_architecture
- name: Add repository into list
ansible.builtin.apt_repository:
repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/gpg-pub-docker.gpg] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable"
repo: "deb [arch={{ deb_architecture.stdout }} signed-by=/usr/share/keyrings/gpg-pub-docker.gpg] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable"
state: present
filename: docker