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