Files
Kamino/roles/docker/tasks/main.yml
T
Dragonish 567e9cca7c
Build / build (pull_request) Successful in 27s
Lint / lint (pull_request) Successful in 2m15s
Molecule / molecule (pull_request) Successful in 4m17s
feat(docker): add opt-in boot and shutdown units for hosts that run Docker with live-restore
docker_start_missed installs a boot unit that starts the containers dockerd's
restore pass skipped after a reboot of the whole host. docker_stop_at_shutdown
installs a unit that ends container processes at shutdown while the network and
NFS shares are still up, so a container holding an NFS mount no longer stalls
the shutdown. Both default to false and do nothing without /usr/bin/docker.

Refs #369

Assisted-by: Claude Code
2026-11-25 17:31:37 +00:00

41 lines
1.1 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: 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