automation/jitsi/ansible/roles/docker/tasks/main.yml

49 lines
No EOL
1.1 KiB
YAML

---
- name: "Check that host runs Debian buster/sid on x86_64"
assert:
that:
- "ansible_architecture == 'aarch64' or ansible_architecture == 'x86_64'"
- "ansible_os_family == 'Debian'"
- name: Remove stale Docker versions
apt:
state: absent
name:
- docker
- docker-engine
- docker.io
- containerd
- runc
- name: Install Docker prerequisities
apt:
state: present
update_cache: yes
name:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- name: Add Docker's GPG key to apt
apt_key:
url: https://download.docker.com/linux/debian/gpg
- name: Add Docker's repository to apt
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/debian buster stable
state: present
- name: Install Docker
apt:
state: present
update_cache: yes
name:
- docker-ce
- docker-ce-cli
- containerd.io
# For docker-compose it's a bit lame:
# sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose