45 lines
957 B
YAML
45 lines
957 B
YAML
---
|
|
- name: Add Docker PGP key
|
|
apt_key:
|
|
keyserver: keys.openpgp.org
|
|
id: 0x8D81803C0EBFCD88
|
|
state: present
|
|
|
|
- name: Add Docker apt repository
|
|
apt_repository:
|
|
repo: 'deb [arch=arm64] https://download.docker.com/linux/ubuntu focal stable'
|
|
state: present
|
|
update_cache: true
|
|
|
|
- name: Install Docker
|
|
apt:
|
|
name: "{{ item }}"
|
|
state: present
|
|
loop:
|
|
- docker-ce
|
|
- docker-compose-plugin
|
|
|
|
- name: Create docker-compose symlink
|
|
file:
|
|
src: /usr/libexec/docker/cli-plugins/docker-compose
|
|
name: /usr/local/bin/docker-compose
|
|
state: link
|
|
|
|
- name: Install Python bindings for Docker Compose
|
|
pip:
|
|
executable: pip3
|
|
name: docker-compose
|
|
state: present
|
|
|
|
- name: Create base directory for Docker volumes
|
|
file:
|
|
name: "{{ base_volume }}"
|
|
owner: "{{ ansible_user }}"
|
|
mode: u=rwx,g=rx,o=rx
|
|
state: directory
|
|
|
|
- name: Set up Docker services
|
|
import_tasks: services.yml
|
|
tags:
|
|
- services
|