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
|
name: docker-compose
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Ensure group "somegroup" exists
|
- name: Create docker group
|
||||||
group:
|
group:
|
||||||
name: "{{ docker_user.name }}"
|
name: "{{ docker_user.name }}"
|
||||||
state: present
|
state: present
|
||||||
|
@ -25,6 +25,13 @@
|
||||||
append: true
|
append: true
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Add user to docker group
|
||||||
|
user:
|
||||||
|
name: "{{ user }}"
|
||||||
|
groups: "docker"
|
||||||
|
append: true
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Clean up docker containers
|
- name: Clean up docker containers
|
||||||
cron:
|
cron:
|
||||||
name: clean up docker containers
|
name: clean up docker containers
|
||||||
|
|
Loading…
Reference in a new issue