Use ansible_user
This commit is contained in:
parent
5c56b99173
commit
7cb5a35bf9
@ -10,7 +10,7 @@
|
||||
|
||||
- name: Create Docker directory
|
||||
file:
|
||||
path: "/home/{{ user }}/Docker"
|
||||
path: "/home/{{ ansible_user }}/Docker"
|
||||
state: directory
|
||||
owner: 1000
|
||||
group: 1000
|
||||
@ -23,9 +23,9 @@
|
||||
path: /var/run/docker.sock
|
||||
mode: 0666
|
||||
|
||||
- name: Add user to Docker group
|
||||
- name: Add ansible_user to Docker group
|
||||
user:
|
||||
name: "{{ user }}"
|
||||
name: "{{ ansible_user }}"
|
||||
groups: docker
|
||||
append: true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user