forc_ad_automated/roles/docker/tasks/main.yml

46 lines
1.0 KiB
YAML

---
- 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
##### 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
- name: Install Docker
apt:
pkg:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-compose-plugin
update_cache: true
- name: Install docker-compose
pip:
name:
- docker
- docker-compose
- name: Check if Docker is up and running
service:
name: docker
state: started
enabled: true