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.

2.8 KiB

docker logo

Ansible role: docker

Build Status License Ansible Role GitHub tag

Description

Install and configure docker containerization platform.

Requirements

  • Ansible >= 2.3

Role Variables

All variables which can be overridden are stored in defaults/main.yml file as well as in table below.

Name Default Value Description
dockerpy no Install docker-py package
docker_proxy no Enable HTTP proxy setup
docker_http_proxy "" HTTP proxy server address
docker_https_proxy "" HTTPS proxy server address
docker_no_proxy "" Comma-separated list of hosts which won't use HTTP proxy
docker_version "17.06" docker version which should be installed on target server. Can use latest for updates
docker_default_config [ storage-driver: devicemapper, log-level: info ] Docker daemon configuration

Example

Playbooks

Just install Docker with default config

- hosts: servers
  roles:
    - mongrelion.docker

Install and configure docker daemon

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

Local Testing

The preferred way of locally testing the role is to use Docker and 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:

pip install ansible 'ansible-lint>=3.4.15' 'molecule==1.25.0' docker 'testinfra>=1.7.0,<=1.10.1' jmespath

This should be similar to one listed in .travis.yml file in install section. After installing test suit you can run test by running

molecule test

For more information about molecule go to their docs.

License

This project is licensed under MIT License. See LICENSE for more details.

Author Information

You can find me on Twitter: @mongrelion