An Ansible role to install Docker (CE or EE) on various Linux distributions.
Distribution | Version |
---|---|
CentOS | 7 |
Debian | Buster 10 |
Stretch 9 (stable) | |
Fedora | 29 |
28 | |
Ubuntu | Disco 19.04 |
Cosmic 18.10 | |
Bionic 18.04 (LTS) | |
Xenial 16.04 (LTS) |
ansible-galaxy install erjac77.docker
# Flag to uninstall old versions of Docker
docker_uninstall_old_versions: false
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition)
docker_edition: ce
# Docker and containerd packages
docker_packages:
- "docker-{{ docker_edition }}"
- "docker-{{ docker_edition }}-cli"
- containerd.io
# State can be one of: 'present' or 'latest'
docker_state: present
# List of users to be added to the docker group
docker_users:
- "{{ lookup('env', 'USER') }}"
# Flag to configure Docker to start on boot
docker_start_on_boot: true
# Docker SDK for Python
docker_pip_dependencies:
- python-setuptools
- python-pip
docker_pip_packages:
- docker
# Flag to install Docker Compose
docker_install_compose: true
# Architecture can be one of: 'amd64', 'armhf', 'arm64', 'ppc64el' or 's390x'
docker_arch: amd64
# APT release channel can be one or many of: 'stable', 'nightly' or 'test'
docker_channels:
- stable
None.
- name: Install Docker
hosts: all
become: true
roles:
- erjac77.docker
Apache 2.0
Eric Jacob (@erjac77)