You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manage Docker installation, versions, upgrades, uninstallation, and user management on Linux hosts using Ansible.
Requirements
Tested on: [ Ubuntu 22.04 / 24.04, Mint 21.3, Debian trixie ]
Requires apt on target hosts.
Ensure the user running the playbook has ansible_become_pass:<password>
Role Variables
Variable
Description
action
Determines which operation the role will perform. Supported actions: install, check_installed, check_version, check_repo_versions, upgrade, uninstall_engine, add_docker_user
version
Docker version to install or upgrade to (format: x.y.z). Required for install and upgrade actions
user
System user to add to the Docker group. Required for add_docker_user action
Supported Actions
Action
Description
install
Installs a specific Docker version. Requiredversion variable.
check_installed
Checks if Docker is already installed.
check_version
Displays the currently installed Docker version.
check_repo_versions
Shows available Docker versions from the repository.
upgrade
Upgrades Docker to a specific version. Requiredversion variable.
uninstall_engine
Uninstalls Docker Engine, CLI, containerd, and Docker Compose.
add_docker_user
Adds a non-root user to the Docker group. Requireduser variable.