docker
Ansible Docker role for EL 6/7
This role installs the latest version of Docker from the official Docker repositories. All the other roles I've found seemed to be way more opinionated. This one just installs docker-ce
, starts the service, then leaves you alone. Good day sir.
CentOS 6 Support
The master
branch uses Docker CE and thus only supports CentOS 7. For CentOS 6 support, use the centos6
branch:
$ ansible-galaxy install git+https://github.com/DavidWittman/ansible-docker.git,centos6 -p /path/to/roles/dir
Updates will be made to this branch for maintenance only and support for CentOS 6 will be fully deprecated in the future.
Role Variables
docker_opts
- Arguments passed to the docker daemon at start timedocker_env
- Dictionary of environment variables to set for the docker daemondocker_engine_cleanup
- Set this variable totrue
to clean up the olddocker-engine
repositories and packages.
Common Settings
Using an HTTP(S) proxy with Docker
Use the docker_env
variable to set the HTTP_PROXY
and/or HTTPS_PROXY
environment variables:
- hosts: all
roles:
- role: DavidWittman.docker
docker_env:
HTTP_PROXY: "http://127.0.0.1:8080"
HTTPS_PROXY: "https://127.0.0.1:8080"
Testing
This role can be quickly deployed with Vagrant or with Test Kitchen to deploy and run a set of automated tests with bats.
Vagrant
$ vagrant up
Test Kitchen
# Install dependencies
$ bundle install
# Deploy, provision, and run tests
$ kitchen test
Install
ansible-galaxy install DavidWittman/ansible-docker
License
Unknown
Downloads
90
Owner
Dev, Ops, Security, Lens Flares