Giter Club home page Giter Club logo

ansible-docker-role's Introduction

Ansible Docker Role

Build Status

Dependencies

  • Ansible >= 2.7
  • pyOpenSSL

Setup

  • Install ansible and dependencies by running pip install -r requirements.txt.

  • Add this role to your playbook requirements.yml:

- src: https://github.com/5monkeys/ansible-docker-role
  name: docker
  • Update ansible.cfg to search for roles relative to playbook:
roles_path = ./roles
  • Install playbook dependencies by running ansible-galaxy install -r requirements.yml.

Variables

# What docker version to be installed (18.06, 5:18.09). Default is latest.
docker_ce_version:

# If linux-image-extra packages should be installed. Needed for the AUFS storage driver.
docker_install_kernel_extras: false
# Where to download TLS-certificates
docker_home: ".docker"
# Maps to docker -H
docker_hosts:
  - "unix://"
  - "tcp://0.0.0.0:2376"
# What docker storage driver to use
docker_storage_driver: "overlay2"
# What version of the docker python library to use
docker_python_version: "4.0.1"

# If TLS should be enabled on the docker daemon and SSL-certificates generated
docker_use_tls: true
# What to set as Organization in SSL-certificates
docker_tls_organization: "Acme"
# Where to place certificates on host
docker_tls_path: "/etc/docker/certs"
# When the client certificate should expire. 
docker_tls_client_expires_after: "+52w"
# The client certificate common name
docker_tls_client_common_name: "client"

# If a docker swarm manager node should be initialized on the host
docker_enable_swarm: true
# What version of the python openssl library to use
docker_py_openssl_version: "19.0.0"

Example playbook

- name: Setup docker
  hosts: managers
  become: true
  become_user: root
  roles:
    - docker
  vars:
    docker_home: "{{ inventory_dir }}/.certs/"
    docker_tls_organization: "my_org"
    docker_ce_version: "18.06"

ansible-docker-role's People

Contributors

andreif avatar dependabot[bot] avatar hannseman avatar joar avatar kjagiello avatar lundberg avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.