27 lines
591 B
YAML
27 lines
591 B
YAML
---
|
|
|
|
- name: Add the docker repo key
|
|
apt_key:
|
|
url: https://download.docker.com/linux/debian/gpg
|
|
state: present
|
|
|
|
- name: Add docker repo
|
|
apt_repository:
|
|
repo: deb [arch=amd64] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable
|
|
state: present
|
|
|
|
- name: Install docker and docker compose
|
|
apt:
|
|
update_cache: true
|
|
name:
|
|
- docker-ce
|
|
- docker-ce-cli
|
|
- containerd.io
|
|
- docker-compose-plugin
|
|
state: latest
|
|
|
|
- name: Start and enable docker
|
|
systemd:
|
|
name: docker.service
|
|
state: started
|
|
enabled: yes
|