You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
pkrupa 3dafd33fc6
comment-out not working envs
7 years ago
.molecule add molecule and testinfra test suite 7 years ago
.travis add molecule and testinfra test suite 7 years ago
defaults Merge branch 'master' into conditional-install 8 years ago
files/repos Merge pull request #9 from snoby/Ubuntu_17_04_Update 8 years ago
handlers Restrict reloading unit to just systemd systems 8 years ago
meta commenting out zesty support until Docker apt repos support it 8 years ago
tasks Merge pull request #17 from mhutter/conditional-install 8 years ago
templates Make daemon.json settings configurable 8 years ago
tests add molecule and testinfra test suite 7 years ago
vars Move GPG key and Key server vars from defaults to vars. 9 years ago
.gitignore Add Vagrantfile for testing locally 9 years ago
.travis.yml add molecule and testinfra test suite 7 years ago
README.md Only run install script when docker is not installed 8 years ago
molecule.yml comment-out not working envs 7 years ago

README.md

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.

upgrade_docker

Per default, this role will only download and run the installation script when Docker is not installed (or more precise: when dockerd is not in $PATH). Set upgrade_docker to True to override this behavior and force the install script to be run.

So in order to upgrade Docker on managed systems, take the following steps:

  1. Either download a newer version of this role (with a more recent default version) or update docker_version and setup_script_md5_sum in your host/group vars.
  2. Run your playbook with -e upgrade_docker=True

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