Add docker-server role
This commit is contained in:
parent
60bfe3490c
commit
c09c919c19
2 changed files with 27 additions and 0 deletions
26
roles/docker-server/tasks/main.yaml
Normal file
26
roles/docker-server/tasks/main.yaml
Normal 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"
|
||||
|
|
@ -3,5 +3,6 @@
|
|||
- name: teh.entar.net
|
||||
hosts: teh.entar.net
|
||||
roles:
|
||||
- { role: docker-server, become: yes }
|
||||
- { role: mastodon, become: yes }
|
||||
|
||||
|
|
Loading…
Reference in a new issue