geerlingguy/ansible-role-docker — 2.3k★ on GitHub. Ansible Role - Docker
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Available variables are listed below, along with default values (see defaults/main.yml):
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition).
docker_edition: 'ce'
docker_packages:
- "docker-{{ docker_edition }}"
- "docker-{{ docker_edition }}-cli"
- "docker-{{ docker_edition }}-rootless-extras"
- "containerd.io"
- docker-buildx-plugin
docker_packages_state: present
The docker_edition should be either ce (Community Edition) or ee (Enterprise Edition).
You can also specify a specific version of Docker to install using the distribution-specific format:
Red Hat/CentOS: docker-{{ docker_edition }}-<VERSION> (Note: you have to add this to all packages);
Debian/Ubuntu: docker-{{ docker_edition }}=<VERSION> (Note: you have to add this to all packages).
You can control whether the package is installed, uninstalled, or at the latest version by setting docker_packages_state to present, absent, or latest, respectively. Note that the Docker daemon will be automatically restarted if the Docker package is updated. This is a side effect of flushing all handlers (running any of the handlers that have been notified by this and any other role up to this point in the play).
A list of packages to be uninstalled prior to running this role. See Docker's installation instructions for an up-to-date list of old packages that should be removed.
docker_service_manage: true
docker_service_state: started
docker_service_enabled: true
docker_service_start_command: ""
docker_restart_handler_state: restarted
Variables to control the state of the docker service, and whether it should start on boot. If you're installing Docker inside a Docker container without systemd or sysvinit, you should set docker_service_manage to false.
Docker Compose Plugin installation options. These differ from the below in that docker-compose is installed as a docker plugin (and used with docker compose) instead of a standalone binary.
Controls whether this role will add the official Docker repository. Set to false if you want to use the default docker packages for your system or manage the package repository on your own.
(Used only for Debian/Ubuntu.) You can switch the channel to nightly if you want to use the Nightly release.
docker_apt_ansible_distribution is a workaround for Ubuntu variants which can't be identified as such by Ansible, and is only necessary until Docker officially supports them.
You can change docker_apt_repo_url if you need to point Debian or Ubuntu systems at an internal mirror or cache.
You can change docker_apt_gpg_key to a different url if you are behind a firewall or provide a trustworthy mirror.
docker_apt_filename controls the name of the source list file created in sources.list.d. If you are upgrading from an older (<7.0.0) version of this role, you should change this to the name of the existing file (e.g. download_docker_com_linux_debian on Debian) to avoid conflicting lists.
docker_yum_repo_url: "{{ docker_repo_url }}/{{ 'fedora' if ansible_facts.distribution == 'Fedora' else 'rhel' if ansible_facts.distribution == 'RedHat' else 'centos' }}/docker-{{ docker_edition }}.repo"
docker_yum_repo_enable_test: '0'
docker_yum_gpg_key: "{{ docker_repo_url }}/{{ 'fedora' if ansible_facts.distribution == 'Fedora' else 'rhel' if ansible_facts.distribution == 'RedHat' else 'centos' }}/gpg"
(Used only for RedHat/CentOS.) You can enable the Test repo by setting the respective vars to 1.
You can change docker_yum_gpg_key to a different url if you are behind a firewall or provide a trustworthy mirror.
Usually in combination with changing docker_yum_repository as well.
docker_users: []
A list of system users to be added to the docker group (so they can use Docker on the server). Example:
docker_users:
- user1
- user2
docker_daemon_options: {}
Custom dockerd options can be configured through this dictionary representing the json file /etc/docker/daemon.json. Example:
Many users of this role wish to also use Ansible to then build Docker images and manage Docker containers on the server where Docker is installed. In this case, you can easily add in the docker Python library using the geerlingguy.pip role:
We Manage: Helping start-ups and grown-ups scaling their infrastructure in a sustainable way.
The above sponsor(s) are supporting Jeff Geerling on GitHub Sponsors. You can sponsor Jeff's work too, to help him continue improving these Ansible open source projects!
Author Information
This role was created in 2017 by Jeff Geerling, author of Ansible for DevOps.
How active is development on geerlingguy/ansible-role-docker?
The most recent commit recorded on geerlingguy/ansible-role-docker was 7 months ago, based on the GitHub push timestamp. The repository has 899 forks — one of the better signals of community interest.
How many stars does geerlingguy/ansible-role-docker have?
geerlingguy/ansible-role-docker has 2.3k GitHub stars — refresh the page for the live number, or check github.com/geerlingguy/ansible-role-docker. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is geerlingguy/ansible-role-docker open source?
Yes — geerlingguy/ansible-role-docker ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/geerlingguy/ansible-role-docker.
What else is in the Developer Tools space?
geerlingguy/ansible-role-docker is tracked by TopGit under the Developer Tools category, alongside 11 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What is geerlingguy/ansible-role-docker?
geerlingguy/ansible-role-docker (geerlingguy/ansible-role-docker) is a multi-language project on GitHub. From the project's own README: Ansible Role - Docker
What language is geerlingguy/ansible-role-docker written in?
TopGit's last sync did not record a primary language for geerlingguy/ansible-role-docker. Open the repository on GitHub to see the full breakdown by file extension.
What license does geerlingguy/ansible-role-docker use?
geerlingguy/ansible-role-docker is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about geerlingguy/ansible-role-docker?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/geerlingguy/ansible-role-docker is the definitive source.
Read full README in the tab above.
Curious whether ansible-role-docker is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about ansible-role-docker.