mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2025-08-02 13:46:22 +02:00
[rootless docker] Remove DOCKER_HOST environment when toggling between rootless and root docker
This commit is contained in:
parent
218e162054
commit
19df19c432
@ -75,6 +75,13 @@
|
||||
command: /usr/bin/dockerd-rootless-setuptool.sh uninstall --force
|
||||
when: docker_rootless == false and rootless_conf.stat.exists
|
||||
|
||||
- name: Reset DOCKER_HOST environment
|
||||
lineinfile:
|
||||
path: /etc/environment
|
||||
state: absent
|
||||
regexp: '^DOCKER_HOST=unix:///run/user/.*/docker.sock$'
|
||||
when: docker_rootless == false and rootless_conf.stat.exists
|
||||
|
||||
- name: Ensure Docker is started and enabled at boot
|
||||
service:
|
||||
name: docker
|
||||
|
Loading…
Reference in New Issue
Block a user