avinetworks.docker
avinetworks.docker
Role Summary
This role provides:
- Installation of Docker by following the official Docker-Engine installation procedures.
- Management of kernel versions, ensuring the right kernel for Docker is installed.
Supported Operating Systems:
- CentOS 7
- RedHat 7
- Fedora 23, 24, 26, 27, 29
- OracleLinux 7
- Ubuntu 14.04, 16.04
Requirements
This role requires Ansible 2.4 or higher, and the details can be found in the metadata file.
If you need to use privilege escalation (like become: true
) with this role, Ansible 2.2.1 or higher is needed due to a fixed issue: https://github.com/ansible/ansible/issues/17490
Role Variables
You can find more information about the variables at https://docs.docker.com/engine/reference/commandline/dockerd/
Variable | Required | Default | Comments |
---|---|---|---|
docker_edition |
No | ce |
Specify if you want the community (ce) or enterprise (ee) version of Docker. |
docker_ee_url |
No | Undefined |
URL for Docker EE from the Docker Store |
docker_repo |
No | docker |
How Ansible manages the repository (options: "other" or "docker") |
docker_channel |
No | stable |
Release channel of Docker to install. |
docker_ee_version |
No | 17.03 |
Version for Docker EE repository |
... (additional variables follow the same structure) |
Example Playbooks
To install Docker on hosts with basic settings. This installs Docker without devicemapper or production configuration, similar to apt install docker-ce
or yum install docker-ce
.
- hosts: servers
roles:
- role: avinetworks.docker
To install Docker with devicemapper (creates a new LVM on /dev/sda3, do not use an already used block device). This is recommended for production on RHEL/CentOS/Fedora.
- hosts: servers
roles:
- role: avinetworks.docker
docker_storage_driver: devicemapper
docker_block_device: /dev/sda3
To install Docker with AUFS (recommended for production on Ubuntu).
- hosts: servers
roles:
- role: avinetworks.docker
docker_storage_driver: aufs
Check the examples/ folder for more examples.
License
Apache 2.0
Author Information
ansible-galaxy install avinetworks.docker