Make grimes
a docker host
This commit is contained in:
parent
50cb5a56fc
commit
05c7690b83
2 changed files with 20 additions and 1 deletions
|
@ -11,16 +11,26 @@
|
|||
roles:
|
||||
- gateway
|
||||
|
||||
- hosts: intersect
|
||||
- hosts:
|
||||
- intersect
|
||||
- grimes
|
||||
roles:
|
||||
- role: geerlingguy.docker
|
||||
become: true
|
||||
vars:
|
||||
docker_install_compose: false # This role installs the binary directly, which is kinda nasty
|
||||
docker_package: "{{ 'docker-ce' if ansible_os_family == 'Debian' else 'docker' }}"
|
||||
docker_users:
|
||||
- "{{ user }}"
|
||||
- docker-cleanup
|
||||
|
||||
- hosts: intersect
|
||||
roles:
|
||||
- netdata
|
||||
- traefik
|
||||
- watchtower
|
||||
- docker
|
||||
|
||||
- hosts: grimes
|
||||
roles:
|
||||
- netdata
|
||||
|
|
|
@ -3,18 +3,27 @@
|
|||
name: docker-compose
|
||||
become: true
|
||||
|
||||
- name: Ensure group "somegroup" exists
|
||||
group:
|
||||
name: "{{ docker_user.name }}"
|
||||
state: present
|
||||
gid: "{{ docker_user.id }}"
|
||||
become: true
|
||||
|
||||
- name: Create docker user
|
||||
user:
|
||||
name: "{{ docker_user.name }}"
|
||||
uid: "{{ docker_user.id }}"
|
||||
group: "{{ docker_user.name }}"
|
||||
create_home: false
|
||||
become: true
|
||||
|
||||
- name: Add user to docker user group
|
||||
user:
|
||||
name: "{{ user }}"
|
||||
groups: "{{ docker_user.name }}"
|
||||
append: true
|
||||
become: true
|
||||
|
||||
- name: Clean up docker containers
|
||||
cron:
|
||||
|
|
Loading…
Reference in a new issue