// the find
geerlingguy/ansible-role-docker
Ansible Role - Docker
An Ansible role from Jeff Geerling that installs Docker CE/EE across Debian, RedHat, and Suse-family Linux hosts, handling the repo setup, package installation, and daemon service state. It's for anyone already using Ansible to provision servers who wants a maintained, cross-distro Docker install step instead of hand-rolling apt/yum logic per OS.
Actually solves the annoying part: per-distro repo/GPG key setup, obsolete package removal, and the apt-vs-yum version-pinning syntax differences. `docker_daemon_options` maps directly to `/etc/docker/daemon.json` as a dict, so setting storage-driver or log rotation doesn't require templating a file yourself. Has Molecule + CI and is actively maintained (pushed within the last few weeks) as one of Geerling's most-used roles, so distro edge cases are mostly already shaken out. Cleanly separates the Compose plugin path from the legacy standalone binary install, letting you pick either.
Installs the rootless-extras package but does nothing to actually configure rootless mode — you're on your own past that point. Package state changes trigger a handler-flush restart of the docker daemon, which can kill running containers as a side effect of an unrelated role notifying handlers earlier in the play. Version pinning is manual string templating per OS family (the docs literally warn 'you have to add this to all packages'), so it's easy to pin a version on Debian and silently not pin it on RedHat. It's install-only — no Swarm, network, or container lifecycle management, so anything past 'daemon is running' means pairing it with the `community.docker` collection.