Add user to docker group
This commit is contained in:
parent
59a721b243
commit
52ae01d29f
1 changed files with 8 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
name: docker-compose
|
||||
become: true
|
||||
|
||||
- name: Ensure group "somegroup" exists
|
||||
- name: Create docker group
|
||||
group:
|
||||
name: "{{ docker_user.name }}"
|
||||
state: present
|
||||
|
@ -25,6 +25,13 @@
|
|||
append: true
|
||||
become: true
|
||||
|
||||
- name: Add user to docker group
|
||||
user:
|
||||
name: "{{ user }}"
|
||||
groups: "docker"
|
||||
append: true
|
||||
become: true
|
||||
|
||||
- name: Clean up docker containers
|
||||
cron:
|
||||
name: clean up docker containers
|
||||
|
|
Loading…
Reference in a new issue