bitintheskud.ansible-role-docker-ce-centos
Ansible Role to Install Docker CE
This Ansible role installs Docker Community Edition (CE) on CentOS 7.
Requirements
No special requirements.
Role Variables
Name | Required | Default | Example | Description |
---|---|---|---|---|
docker_centos_users | No | [] | ["vagrant"] | Users to be added to the Docker group. |
docker_version | No | "" | "17.12.1" | Specify a version of Docker to install. If left blank, it installs the latest version. |
docker_install_dir | No | "/var/docker/install" | "/tmp" | Directory to download the installation script. |
Dependencies
- CentOS 7
Example Playbook
---
- hosts: localhost
connection: local
gather_facts: true
become: yes
vars:
docker_centos_users:
- vagrant
environment:
VERSION: "{{ docker_version }}"
roles:
- ansible-role-docker-ce-centos
What's Next
- Adapt it for Debian and Ubuntu.
- Reinstall Docker if the installed version is not the target version.