2022-12-25 16:55:40 +00:00
|
|
|
# vim: ft=yaml.ansible
|
2022-12-21 21:25:10 +00:00
|
|
|
---
|
|
|
|
- name: Add Docker PGP key
|
2023-03-22 18:31:21 +00:00
|
|
|
ansible.builtin.apt_key:
|
2023-01-03 21:30:22 +00:00
|
|
|
keyserver: keyserver.ubuntu.com
|
2022-12-23 15:57:37 +00:00
|
|
|
id: '0x8D81803C0EBFCD88'
|
2022-12-21 21:25:10 +00:00
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Add Docker apt repository
|
2023-03-22 18:31:21 +00:00
|
|
|
ansible.builtin.apt_repository:
|
2022-12-21 21:25:10 +00:00
|
|
|
repo: 'deb [arch=arm64] https://download.docker.com/linux/ubuntu focal stable'
|
|
|
|
state: present
|
2022-12-22 16:58:48 +00:00
|
|
|
update_cache: true
|
2022-12-21 21:25:10 +00:00
|
|
|
|
|
|
|
- name: Install Docker
|
2023-03-22 18:31:21 +00:00
|
|
|
ansible.builtin.apt:
|
2022-12-22 19:18:27 +00:00
|
|
|
name: "{{ pkgs }}"
|
2022-12-21 21:25:10 +00:00
|
|
|
state: present
|
2022-12-22 19:18:27 +00:00
|
|
|
vars:
|
|
|
|
pkgs:
|
|
|
|
- docker-ce
|
|
|
|
- docker-compose-plugin
|
2022-12-22 16:58:48 +00:00
|
|
|
|
|
|
|
- name: Create docker-compose symlink
|
2023-03-22 18:31:21 +00:00
|
|
|
ansible.builtin.file:
|
2022-12-22 16:58:48 +00:00
|
|
|
name: /usr/local/bin/docker-compose
|
2022-12-23 15:57:37 +00:00
|
|
|
src: /usr/libexec/docker/cli-plugins/docker-compose
|
2022-12-22 16:58:48 +00:00
|
|
|
state: link
|
2022-12-21 21:25:10 +00:00
|
|
|
|
2022-12-22 19:18:27 +00:00
|
|
|
- name: Install Python bindings for Docker
|
2023-03-22 18:31:21 +00:00
|
|
|
ansible.builtin.pip:
|
2022-12-22 19:18:27 +00:00
|
|
|
name: "{{ pkgs }}"
|
2022-12-21 21:25:10 +00:00
|
|
|
state: present
|
2022-12-22 19:18:27 +00:00
|
|
|
executable: pip3
|
|
|
|
vars:
|
|
|
|
pkgs:
|
|
|
|
- docker
|
|
|
|
- docker-compose
|
2022-12-21 21:25:10 +00:00
|
|
|
|
2022-12-28 16:55:35 +00:00
|
|
|
- name: Set up Docker services
|
2023-03-22 18:31:21 +00:00
|
|
|
ansible.builtin.import_tasks: services.yml
|
2022-12-21 21:25:10 +00:00
|
|
|
tags:
|
2022-12-28 16:55:35 +00:00
|
|
|
- services
|
2022-12-25 17:12:45 +00:00
|
|
|
- reboot
|