GithubHelp home page GithubHelp logo

kobihk / ansible-role-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mongrelion/ansible-role-docker

0.0 1.0 0.0 115 KB

Ansible role for installing Docker

License: MIT License

Shell 53.64% Python 46.36%

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

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. We are using tox to simplify process of testing on multiple ansible versions. To install tox execute:

pip install tox

To run tests on all ansible versions (WARNING: this can take some time)

tox

To run a custom molecule command on custom environment with only default test scenario:

tox -e py27-ansible25 -- molecule test -s default

For more information about molecule go to their docs.

If you would like to run tests on remote docker host just specify DOCKER_HOST variable before running tox tests.

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 jaczel avatar lukas-bednar avatar marcusianlevine avatar mhutter avatar nerab avatar paulfantom avatar petr-balogh avatar porkepix avatar snoby avatar zanewestover avatar

Watchers

 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.