ansible/roles/docker/tasks/main.yaml
Louis Vallat 4b1403be21
feat: initial commit
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
2022-11-14 08:32:06 +01:00

31 lines
764 B
YAML

---
- name: Install required system packages
ansible.builtin.apt:
pkg:
- apt-transport-https
- ca-certificates
- gnupg
- curl
state: latest
update_cache: true
- name: Add Docker GPG apt key
ansible.builtin.apt_key:
url: https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg
state: present
- name: Add Docker repository
ansible.builtin.apt_repository:
repo: deb https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable
state: present
- name: Install docker packages
ansible.builtin.apt:
pkg:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-compose-plugin
state: latest
update_cache: true