Extracted from the environment repository, wave 1. Scrubbed of private references: namespace mortis, no repository paths or issue numbers in comments and docs, the removed docker_ufw_rules guard dropped, the molecule scenario uses the FQCN and no provisioner environment overrides. ansible-lint mocks the role's FQCN because CI checks the Collection out outside an ansible_collections path. Verified: the commit hooks. Not verified: the molecule scenario (CI only). Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
80 lines
3.0 KiB
YAML
80 lines
3.0 KiB
YAML
---
|
|
argument_specs:
|
|
main:
|
|
short_description: Install, update or remove Docker Engine
|
|
description:
|
|
- >-
|
|
Installs Docker Engine from the upstream APT repository, or removes it when C(docker_remove) is true. Optionally updates the packages to
|
|
the current candidate versions, then adds C(docker_users) to C(docker_group).
|
|
- Needs gathered facts, because the APT source uses C(ansible_distribution_release).
|
|
options:
|
|
docker_remove:
|
|
type: bool
|
|
default: false
|
|
description:
|
|
- >-
|
|
Removes Docker instead of installing it. Stops the service, removes the packages, the APT source and the keyring,
|
|
and skips the install, update and group tasks.
|
|
docker_remove_data:
|
|
type: bool
|
|
default: false
|
|
description:
|
|
- >-
|
|
Only used with C(docker_remove). Purges the packages and deletes C(/var/lib/docker), which destroys images, containers and volumes.
|
|
docker_update:
|
|
type: bool
|
|
default: false
|
|
description:
|
|
- >-
|
|
Upgrades each package in C(docker_packages) to its current APT candidate version, pinned as package=version.
|
|
The C(Restart docker) handler is notified only when a package actually changes.
|
|
docker_packages:
|
|
type: list
|
|
elements: str
|
|
default: [docker-ce, docker-ce-cli, containerd.io]
|
|
description:
|
|
- Packages installed, updated or removed.
|
|
docker_keyring_path:
|
|
type: path
|
|
default: /etc/apt/keyrings/docker.asc
|
|
description:
|
|
- Where the Docker repository key is stored.
|
|
docker_apt_list_path:
|
|
type: path
|
|
default: /etc/apt/sources.list.d/docker.list
|
|
description:
|
|
- APT source file written for the Docker repository.
|
|
docker_gpg_url:
|
|
type: str
|
|
default: https://download.docker.com/linux/ubuntu/gpg
|
|
description:
|
|
- URL of the repository signing key.
|
|
docker_repo_base_url:
|
|
type: str
|
|
default: https://download.docker.com/linux/ubuntu
|
|
description:
|
|
- Base URL of the repository. The source line uses C(ansible_distribution_release) and the C(stable) component.
|
|
docker_apt_arch:
|
|
type: str
|
|
default: amd64
|
|
description:
|
|
- Architecture written into the APT source. Override per host if a host is not amd64.
|
|
docker_service:
|
|
type: str
|
|
default: docker
|
|
description:
|
|
- Name of the systemd unit that is enabled, started, restarted and stopped.
|
|
docker_group:
|
|
type: str
|
|
default: docker
|
|
description:
|
|
- Group that C(docker_users) are added to.
|
|
docker_users:
|
|
type: list
|
|
elements: str
|
|
default: []
|
|
description:
|
|
- >-
|
|
Existing users added to C(docker_group) with append. Empty by default, because a role that installs after docker creates its
|
|
run-as user too late and must join the group itself.
|