ansible-core/roles/core_docker/tasks/main.yml
2024-01-05 15:55:27 +01:00

30 lines
659 B
YAML

---
# roles/core_docker/tasks/main.yml
- name: Install prerequisites
ansible.builtin.apt:
name:
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
state: present
update_cache: yes
- name: Add Docker GPG Key
apt_key:
url: https://download.docker.com/linux/{{ distro }}/gpg
state: present
- name: Add Docker Repository
apt_repository:
repo: deb https://download.docker.com/linux/{{ distro }} {{ codename }} stable
state: present
- name: Install Docker
ansible.builtin.apt:
name:
- docker-ce
- docker-compose-plugin
state: present
update_cache: yes