marcusianlevine.docker

Build Status

docker

This guide explains how to install and set up Docker.

Role Variables

docker_config

This is a set of settings saved in Docker's daemon.json configuration file. For more options, check the Docker documentation.

Default settings (you can change these in your docker_config):

  • storage-driver: devicemapper
  • log-level: info

docker_version

This variable lets you choose which version of Docker to install, such as 1.12.6 or 17.05.

Default value: 17.03

setup_script_md5_sum

This is the default MD5 checksum of the setup script for the default docker_version (look in defaults/main.yml for the exact value).

If you want to install a different version of Docker, you must provide a new value for this variable.

You can either:

  1. Generate a new MD5 checksum for the install script of the version you want.
  2. If you're sure about what you're doing and don't mind the security risk, set this variable to "no" or "false" to skip the checksum check.

setup_script_url

This is the URL for the Docker setup script that will install the chosen docker_version.

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

The default URL uses Rancher Labs' setup scripts, which install the correct version of docker-ce or docker-engine from the official Docker repositories.

Dependencies

None

Example Playbook

To install Docker:

- hosts: servers
  roles:
    - mongrelion.docker

To install and configure Docker:

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

Testing

For development, we use Vagrant. Start the virtual machine with:

$ vagrant up

This automatically runs the playbooks on the virtual machine after it starts.
If you make changes to any playbook, you can test it again with:

$ vagrant provision

License

MIT

Author Information

You can find me on Twitter: @mongrelion

Installa
ansible-galaxy install marcusianlevine.docker
Licenza
Unknown
Download
158
Proprietario
Data Science + DevOps = DataEng