mullholland.docker

Ansible Role Docker

This role installs and sets up Docker.

GitHub Downloads Version
github downloads Version

Example Playbook

The following example comes from molecule/default/converge.yml. It is tested every time changes are made.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true
  roles:
    - role: "mullholland.docker"

Role Variables

The default variable values are found in defaults/main.yml:

---
# Choose between 'ce' (Community Edition) or 'ee' (Enterprise Edition).
docker_edition: 'ce'
docker_packages:
  - "docker-{{ docker_edition }}"
  - "docker-{{ docker_edition }}-cli"
  - "containerd.io"
docker_package_state: present

# Options for Docker Compose.
docker_install_compose: true
docker_compose_version: "2.1.1"
docker_compose_url: "https://github.com/docker/compose/releases/download/v{{ docker_compose_version }}/docker-compose-linux-x86_64"
docker_compose_path: "/usr/local/bin/docker-compose"

# For Debian/Ubuntu only. Change 'stable' to 'edge' if necessary.
docker_apt_repo_key_url: "https://download.docker.com/linux/ubuntu/gpg"
docker_apt_release_channel: stable

# To add existing users to the docker group
docker_add_users: []
#  - ansible
#  - ansiblemgmt

# Location of the ENV file
docker_opts_path: "/etc/docker"
# List of docker options you want to specify:
docker_opts_common: []
#  - "-H fd://"
docker_opts_individual: []
# - "--insecure-registry myregistrydomain.com:5000"
# - "--ipv6"

Requirements

Context

This role works with many other compatible roles. For more details, check the documentation of these roles.

Here’s an overview of related roles: dependencies

Compatibility

This role has been tested with these container images:

container tags
EL all
Fedora 38, 39
Ubuntu all
Debian all

You need at least Ansible version 2.10. Tests were conducted for:

  • The previous version.
  • The current version.
  • The development version.

If you encounter any issues, please report them on GitHub.

License

MIT.

Author Information

Mullholland

Informazioni sul progetto

Installs and configures Docker.

Installa
ansible-galaxy install mullholland.docker
Licenza
apache-2.0
Download
4.9k
Proprietario