Add docker-server role

This commit is contained in:
Erik Stambaugh 2022-11-07 19:08:54 -08:00
parent 60bfe3490c
commit c09c919c19
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,26 @@
---
- name: install docker
apt:
force_apt_get: yes
name: "{{ packages }}"
vars:
packages:
- docker.io
- docker-compose
# TODO
#- name: Add users to docker group
# user:
# name: "{{ item }}"
# groups: docker
# append: yes
# with_items:
# - user_list_goes_here
- name: do some cleanup
command: "{{item}}"
with_items:
- "docker image prune -a --force"
- "docker system prune --volumes --force"

View file

@ -3,5 +3,6 @@
- name: teh.entar.net
hosts: teh.entar.net
roles:
- { role: docker-server, become: yes }
- { role: mastodon, become: yes }