Skip to content

marcusianlevine/ansible-role-docker

This branch is 3 commits ahead of, 96 commits behind mongrelion/ansible-role-docker:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8521f4b · Aug 4, 2017

History

54 Commits
Jul 23, 2017
Jul 5, 2017
Nov 4, 2016
Jul 30, 2017
Aug 4, 2017
Jul 4, 2017
Nov 28, 2016
Nov 28, 2016
Jun 24, 2016
Jun 24, 2016
Jul 30, 2017
Nov 28, 2016

Repository files navigation

Build Status

docker

Install and configure Docker.

Role Variables

docker_config

A dict of options that are written into docker's daemon.json config file. See the docs for dockerd for a full list of available options.

Default values: (set them in your docker_config to overwrite)

storage-driver: devicemapper
log-level: info

docker_version

Specify the version of Docker to install, e.g. 1.12.6, 17.05.

Default value: 17.03

setup_script_md5_sum

Default value: md5 checksum of default docker_version setup script (see defaults/main.yml for exact default value)

If you intend to install a version of Docker other than the default, you must provide an appropriate override value for this variable.

Either:

  1. Generate an md5 checksum for the desired version's install script
  2. If you know what you are doing and are not worried about security, set this variable to "no" or "false" to disable checksum verification of the setup script.

setup_script_url

URL pointing to a Docker setup script that will install the specified docker_version.

Default value: https://releases.rancher.com/install-docker/{{ docker_version }}.sh

The default URL utilizes Rancher Labs' version-specific, OS-agnostic setup scripts, which in turn just install the appropriate version of docker-ce or docker-engine from the official Docker apt and yum repositories.

Dependencies

None

Example Playbook

Install Docker

- hosts: servers
  roles:
    - mongrelion.docker

Install and configure docker

- hosts: servers
  roles:
    - role: mongrelion.docker
      docker_config:
        live-restore: true
        userland-proxy: false

Testing

For development, we use Vagrant. Bring the VM up with

$ vagrant up

This will automatically run the playbooks against the virtual machine once it's up.
After making changes to any playbook, you can test the provisioning with

$ vagrant provision

License

MIT

Author Information

You can find me on Twitter: @mongrelion

About

Ansible role for installing Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published