docker_apt_arch defaults to empty, which derives amd64 or arm64 from the host architecture; another architecture fails the play, and a set value is always used. Assisted-by: Claude Code
36 lines
980 B
YAML
36 lines
980 B
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: Flush handlers
|
|
ansible.builtin.meta: flush_handlers
|