Add docker setup

This commit is contained in:
sonny 2023-06-25 18:29:47 +02:00
parent 58fade9e5f
commit fbf688606e
5 changed files with 33 additions and 0 deletions

BIN
files/docker.gpg Normal file

Binary file not shown.

View file

@ -9,6 +9,7 @@
tasks: tasks:
- import_tasks: 'tasks/setup.yml' - import_tasks: 'tasks/setup.yml'
- import_tasks: 'tasks/network.yml' - import_tasks: 'tasks/network.yml'
- import_tasks: 'tasks/docker.yml'
- import_tasks: 'tasks/radicale.yml' - import_tasks: 'tasks/radicale.yml'
- import_tasks: 'tasks/syncthing.yml' - import_tasks: 'tasks/syncthing.yml'
- import_tasks: 'tasks/transmission.yml' - import_tasks: 'tasks/transmission.yml'

27
tasks/docker.yml Normal file
View file

@ -0,0 +1,27 @@
- name: 'prepare apt keyring'
become: true
command: install -m 0755 -d /etc/apt/keyrings
- name: 'copy docker gpg key'
become: true
file:
src: 'files/docker.gpg'
dest: '/etc/apt/keyrings/docker.gpg'
owner: root
- name: 'install docker apt source'
become: true
template:
src: 'templates/docker/docker.j2'
dest: '/etc/apt/sources.list.d/docker.list'
owner: root
- name: 'install docker'
become: true
apt:
update_cache: true
name:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-compose-plugin

3
templates/docker.j2 Normal file
View file

@ -0,0 +1,3 @@
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable

View file

@ -6,3 +6,5 @@ packages:
- mpd - mpd
- python3-virtualenv - python3-virtualenv
- wireguard-tools - wireguard-tools
- ca-certificates
- gnupg