2022-10-28 23:43:04 +02:00
|
|
|
---
|
|
|
|
|
2022-09-28 19:52:28 +02:00
|
|
|
- name: Install required apt packages for Docker
|
|
|
|
apt:
|
|
|
|
pkg:
|
|
|
|
- apt-transport-https
|
|
|
|
- ca-certificates
|
|
|
|
- curl
|
|
|
|
- software-properties-common
|
|
|
|
- python3-pip
|
|
|
|
- virtualenv
|
|
|
|
- python3-setuptools
|
|
|
|
update_cache: true
|
|
|
|
|
2022-10-28 23:18:10 +02:00
|
|
|
##### WARNING OUTDATED!!! NEED FIX ASAP
|
|
|
|
#- name: Add Docker GPG apt Key
|
|
|
|
# apt_key:
|
|
|
|
# url: 'https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg'
|
|
|
|
# state: present
|
|
|
|
#
|
|
|
|
#- name: Add Docker Repository
|
|
|
|
# apt_repository:
|
|
|
|
# repo: 'deb https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable'
|
|
|
|
# state: present
|
2022-09-28 19:52:28 +02:00
|
|
|
|
|
|
|
- name: Install Docker
|
|
|
|
apt:
|
|
|
|
pkg:
|
|
|
|
- docker-ce
|
|
|
|
- docker-ce-cli
|
|
|
|
- containerd.io
|
|
|
|
- docker-compose-plugin
|
|
|
|
update_cache: true
|
|
|
|
|
2022-10-28 23:18:10 +02:00
|
|
|
- name: Install docker-compose
|
2022-09-28 19:52:28 +02:00
|
|
|
pip:
|
|
|
|
name:
|
|
|
|
- docker
|
|
|
|
- docker-compose
|
|
|
|
|
|
|
|
- name: Check if Docker is up and running
|
|
|
|
service:
|
|
|
|
name: docker
|
|
|
|
state: started
|
|
|
|
enabled: true
|