Code Monkey home page Code Monkey logo

ansible-role-docker's Introduction

docker logo

Ansible role: docker

Build Status License Ansible Role

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
docker_compose yes Install docker-compose 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
docker_users [] Add users to docker group. Users must exist before adding. Construct like - {{ ansible_env['SUDO_USER'] | default(ansible_user_id) }} could be used to specify user which is used for ansible connection to host.

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 (v2.x). 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>2.12.0' docker 'testinfra>=1.7.0'

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

Contributors

ansible-role-docker's People

Contributors

ageekymonk avatar brucellino avatar drwahl avatar giannidallatorre avatar lukas-bednar avatar marcusianlevine avatar mhutter avatar nerab avatar paulfantom avatar petr-balogh avatar snoby avatar zanewestover avatar

Watchers

 avatar  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.