ansible/roles/docker/tasks/main.yml

34 lines
755 B
YAML

---
- name: Add docker gpg key
ansible.builtin.apt_key:
keyserver: pgp.mit.edu
id: 8D81803C0EBFCD88
state: present
- name: Add docker apt repository
ansible.builtin.apt_repository:
repo: deb https://download.docker.com/linux/ubuntu bionic stable
state: present
update_cache: true
- name: Install docker-ce
ansible.builtin.apt:
name: docker-ce
state: present
- name: Install docker python bindings
ansible.builtin.pip:
executable: pip3
name: docker-compose
state: present
- name: Create folder structure for bind mounts
ansible.builtin.file:
name: '{{ volume_root_folder }}'
state: directory
- name: Setup services
ansible.builtin.import_tasks: services.yml
tags:
- setup_services