Skip to content

mullholland/ansible-role-docker

Repository files navigation

Installs and configures Docker.

GitHub Downloads Version
github downloads Version

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

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

The default values for the variables are set in 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"
  - "containerd.io"
docker_package_state: present

# Docker Compose options.
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"

# Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed.
docker_apt_repo_key_url: "https://download.docker.com/linux/ubuntu/gpg"
docker_apt_release_channel: stable

# Adding existing user to docker group
docker_add_users: []
#  - ansible
#  - ansiblemgmt

# Where the ENV file is saved
docker_opts_path: "/etc/docker"
# If you want to specify any docker options this variable has to be a list:
docker_opts_common: []
#  - "-H fd://"
docker_opts_individual: []
# - "--insecure-registry myregistrydomain.com:5000"
# - "--ipv6"

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles: dependencies

This role has been tested on these container images:

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

The minimum version of Ansible required is 2.10, tests have been done to:

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

If you find issues, please register them in GitHub.

MIT.

Mullholland

About

Install and configure docker.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages