Made docker role compatible with other architectures and ubuntu

This commit is contained in:
uumas
2021-12-02 03:34:30 +02:00
parent 13c8081395
commit c941e0105e
2 changed files with 11 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
namespace: uumas
name: docker
version: 0.2.0
version: 0.3.0
readme: README.md
repository: https://git.uumas.fi/uumas/ansible-docker
license_file: LICENSE

View File

@@ -10,13 +10,22 @@
- lsb-release
update_cache: true
- name: Set dpkg arch (amd64)
set_fact:
dpkg_arch: amd64
when: ansible_architecture == 'x86_64'
- name: Set dpkg arch (arm64)
set_fact:
dpkg_arch: arm64
when: ansible_architecture == 'aarch64'
- name: Add docker repo signing key
apt_key:
id: '9DC858229FC7DD38854AE2D88D81803C0EBFCD88'
url: 'https://download.docker.com/linux/debian/gpg'
- name: Add docker repo
apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
repo: "deb [arch={{ dpkg_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable"
filename: 'docker'
mode: '644'