2024-01-06 14:33:26 +00:00
|
|
|
---
|
|
|
|
# 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
|
2024-03-05 08:08:10 +00:00
|
|
|
|
|
|
|
- name: Run docker-compose creation process
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
name: docker
|
|
|
|
tasks_from: compose
|
|
|
|
when: core_docker_compose
|