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
41 lines
1.1 KiB
YAML
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
|