mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2025-07-28 13:46:36 +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
|
||||
|
||||
- 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
|
||||
lineinfile:
|
||||
path: /etc/environment
|
||||
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