Files
Kamino/roles/docker/tasks/main.yml
T
Dragonish 887302b208
Build / build (pull_request) Successful in 51s
Molecule / molecule (pull_request) Canceled after 0s
Lint / lint (pull_request) Canceled after 1m20s
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
2026-11-25 19:42:06 +00:00

46 lines
1.3 KiB
YAML

---
- name: Validate inputs
ansible.builtin.import_tasks: validate.yml
when: not (docker_remove | default(false) | bool)
tags: always
- name: Remove Docker (explicit only)
ansible.builtin.include_tasks: remove.yml
when: docker_remove | default(false) | bool
tags: [docker, remove]
- name: Write the daemon settings
ansible.builtin.include_tasks: daemon.yml
when: not (docker_remove | default(false) | bool)
tags: [docker, configure]
- name: Install Docker Engine
ansible.builtin.include_tasks: install.yml
when: not (docker_remove | default(false) | bool)
tags: [docker, install]
- name: Ensure Docker Engine is up-to-date
ansible.builtin.include_tasks: update.yml
when:
- not (docker_remove | default(false) | bool)
- docker_update | bool
tags: [docker, update]
- name: Add configured users to the docker group
become: true
ansible.builtin.user:
name: "{{ item }}"
groups: "{{ docker_group }}"
append: true
loop: "{{ docker_users }}"
when: not (docker_remove | default(false) | bool)
tags: [docker, configure]
- name: Install or remove the boot and shutdown units
ansible.builtin.include_tasks: units.yml
when: not (docker_remove | default(false) | bool)
tags: [docker, configure]
- name: Flush handlers
ansible.builtin.meta: flush_handlers