From 4d8c5443d10fb2bbe0b2287a499413287fd9562f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Wed, 28 Jun 2023 12:45:07 +0000 Subject: [PATCH] add service restart variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- README.md | 5 ++++- defaults/main.yml | 1 + handlers/main.yml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 762ebf1..3c7f756 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ docker_bash_completion_shasum: "cd9c70120bc5f7e6772b6a5350abf63099004c357814abc8 docker_compose_bash_completion_shasum: "9926c945b466fad570ad574089d6a90f7d9ba452a2d6a8ba67611a664707f0de" docker_rootful: false docker_rootful_enabled: false +docker_service_restart: true docker_rootful_opts: > --live-restore --icc=false --default-ulimit nproc=512:1024 --default-ulimit nofile=100:200 -H fd:// docker_url: "https://download.docker.com/linux/static/stable/x86_64" @@ -54,7 +55,6 @@ docker_user_bashrc: false docker_allow_privileged_ports: false docker_allow_ping: false docker_compose: false -... ``` Before using this role you first have to decide if you want to install Docker @@ -69,6 +69,9 @@ a manual install, not requiring any `root` permissions. If `docker_rootful: true`, then `docker_rootful_enabled` will decide if the daemon should be enabled as a service or not. +`docker_service_restart` will restart the rootless service after the Docker +binaries has been extracted. + Using `docker_rootful: true` and `docker_rootful_enabled: true`, will result in a standard Docker installation, with an additional Docker daemon, running as a non-root user. diff --git a/defaults/main.yml b/defaults/main.yml index 1b94671..e6dab6f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -17,4 +17,5 @@ docker_user_bashrc: false docker_allow_privileged_ports: false docker_allow_ping: false docker_compose: false +docker_service_restart: true ... diff --git a/handlers/main.yml b/handlers/main.yml index 032e6d3..aa9d8d1 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -6,4 +6,5 @@ name: docker.service state: restarted scope: user + when: docker_service_restart ...