gmauro / ansible-docker

Ansible role to install Docker on Ubuntu or Debian systems.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ansible Docker Build Status

Ansible role to install Docker-CE and extensions on Ubuntu or Debian systems .

Usage

Clone this repo into your roles directory:

$ git clone https://github.com/gmauro/ansible-docker.git roles/docker

And add it to your play's roles:

- hosts: yourhost

  roles:
    - role: docker
      become: yes
  tasks:
    - name: "ensure user part of docker group"
      user:
        name: "ubuntu"
        groups: docker
        append: yes
      become: yes
    - name: reset ssh connection to allow user changes to affect 'current login user'
      meta: reset_connection
  post_tasks:
    - name: Remove useless packages from the cache
      apt:
        autoclean: yes
      become: yes
    - name: Remove dependencies that are no longer required
      apt:
        autoremove: yes
      become: yes

This role comes preloaded with multiple available defaults. You can override each one in your hosts/group vars, in your inventory, or in your play. See the annotated defaults in defaults/main.yml for help in configuration.

About

Ansible role to install Docker on Ubuntu or Debian systems.