feat(docker): manage /etc/docker/daemon.json (live-restore, log driver, extra options)
Adds docker_daemon_options, docker_live_restore, docker_log_driver, docker_log_max_size, docker_log_max_file and docker_daemon_restart. The file is written, before the packages are installed, only when one of the first five is set, so a host that sets none is unchanged; the role then owns the whole file. It restarts dockerd only when docker_daemon_restart is true, because a restart with live-restore off ends every container, and says so when the file applies later. A key set by both docker_daemon_options and a dedicated input, and a bad log value, stop the run before any change. Closes #375 Assisted-by: Claude Code:claude-sonnet-5-5
This commit is contained in:
1 parent
428b88a822
commit
887302b208
10 files changed
+302
-1
No files matched your search
@@ -46,3 +46,17 @@ docker_start_missed_settle_seconds: 30
|
||||
# Off by default; set it on a host whose containers mount NFS shares.
|
||||
docker_stop_at_shutdown: false
|
||||
docker_stop_at_shutdown_timeout: 30
|
||||
|
||||
# /etc/docker/daemon.json. The role writes the file only when at least one of these is set, and then owns it whole: a key it does not
|
||||
# know is removed. Nothing is written by default, so a host that sets none of them keeps its file. The role restarts dockerd only when
|
||||
# docker_daemon_restart is true (a restart with live-restore off ends every container); otherwise the file applies at the next restart.
|
||||
# Extra daemon.json keys, merged as they are; a key that a dedicated input below also sets is refused.
|
||||
docker_daemon_options: {}
|
||||
# true writes "live-restore": true, so a docker.service restart leaves running containers alone.
|
||||
docker_live_restore: false
|
||||
# "log-driver" (for example local) and the "max-size" and "max-file" log options (for example 10m and "3", quoted). Empty writes nothing.
|
||||
docker_log_driver: ""
|
||||
docker_log_max_size: ""
|
||||
docker_log_max_file: ""
|
||||
# true restarts dockerd when the file changed.
|
||||
docker_daemon_restart: false
|
||||
Reference in new issue
Block a user