mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2025-08-02 13:46:22 +02:00
[rootless docker] Lookup XDG_RUNTIME_DIR variable properly
This commit is contained in:
parent
0eef25269a
commit
5685a017bb
@ -36,10 +36,10 @@
|
|||||||
scope: user
|
scope: user
|
||||||
|
|
||||||
- name: Decouple rootless docker from user session
|
- name: Decouple rootless docker from user session
|
||||||
command: loginctl enable-linger {{ ansible_user }}
|
command: "loginctl enable-linger {{ ansible_user }}"
|
||||||
|
|
||||||
- name: Add DOCKER_HOST to systemwide environment file
|
- name: Add DOCKER_HOST to systemwide environment file
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/environment
|
path: /etc/environment
|
||||||
insertafter: EOF
|
insertafter: EOF
|
||||||
line: 'DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock'
|
line: "DOCKER_HOST=unix://{{ lookup('env', 'XDG_RUNTIME_DIR') }}/docker.sock"
|
||||||
|
Loading…
Reference in New Issue
Block a user