@ -23,7 +21,7 @@ Specify the version of Docker to install, e.g. `1.12.6`, `17.05`.
Default value: `17.03`
### `setup_script_md5_sum`
### `docker_setup_script_md5_sum`
Default value: md5 checksum of default `docker_version` setup script (see `defaults/main.yml` for exact default value)
@ -34,7 +32,7 @@ Either:
1. Generate an md5 checksum for the desired version's install script
1. 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`
### `docker_setup_script_url`
URL pointing to a Docker setup script that will install the specified `docker_version`.
The default URL utilizes [Rancher Labs' version-specific, OS-agnostic setup scripts](https://github.com/rancher/install-docker), which in turn just install the appropriate version of `docker-ce` or `docker-engine` from the official Docker `apt` and `yum` repositories.
### `upgrade_docker`
### `docker_upgrade`
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
`docker_upgrade` 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:
0. 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
version) or update `docker_version` and `docker_setup_script_md5_sum` in your
host/group vars.
1. Run your playbook with `-e upgrade_docker=True`
1. Run your playbook with `-e docker_upgrade=True`
`docker_proxy` specifies if proxy need to be applied. Default value of `docker_proxy` is no. If you need proxy set it to yes and updated other three variables as needed.
Dependencies
------------
## Dependencies
None
Example Playbook
----------------
## Example Playbook
Install Docker
```yaml
- hosts: servers
@ -84,28 +81,24 @@ Install and configure docker
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
## Testing
The preferred way of locally testing the role is to use Docker and [molecule](https://github.com/metacloud/molecule) (v1.25). You will have to install Docker on your system. See Get started for a Docker package suitable to for your system.
All packages you need to can be specified in one line: