Giter VIP home page Giter VIP logo

ansible-docker's Introduction

ansible-docker

Installs docker-daemon and cli.

Requirements

CPU architecture:

  • x86_64 / amd64
  • armv7l / armhf
  • aarch64 / arm64

Operating systems:

  • Ubuntu:
    • 16.04 (xenial)
    • 18.04 (bionic)
    • 20.04 (focal)
  • Debian
    • 9 (stretch)
    • 10 (buster)

Tasks

  • Add repository key from keyserver
  • Add docker repository
  • Install docker-ce package
  • Setup docker daemon options (optional)
  • Setup docker-cleanup systemd service (optional)
  • Setup python3 docker via pip (optional)

Role parameters

Variable Type Mandatory? Default Description
docker_storage_driver text no <empty => aufs> The docker storage driver (consider documentation)
docker_cleanup_enabled text no no => disabled Creates a systemd service to delete all stopped containers and delete unused images
docker_cleanup_on_calendar text no daily Choose when your cleanup timer will be triggered
docker_install_pip_package text no no => will not be installed Installs the python docker pip package

Usage

Add to requirements.yml:

- name: install-docker
  src: https://github.com/borisskert/ansible-docker.git
  scm: git

Example playbooks

Minimal:

- hosts: test_machine
  become: yes

  roles:
    - role: install-docker

All parameters:

- hosts: test_machine
  become: yes

  roles:
    - role: install-docker
      docker_storage_driver: overlay2
      docker_cleanup_enabled: yes
      docker_cleanup_on_calendar: daily
      docker_install_pip_package: yes

Testing

Requirements:

Run within docker

molecule test

Run within Vagrant

molecule test --scenario-name vagrant --parallel

I recommend to use pyenv for local testing. Within the Github Actions pipeline I use my own molecule Docker image.

ansible-docker's People

Contributors

borisskert avatar flandigt avatar

Watchers

 avatar

ansible-docker's Issues

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.