An open API service indexing awesome lists of open source software.

https://github.com/gmauro/ansible-docker

Ansible role to install Docker on Ubuntu or Debian systems.
https://github.com/gmauro/ansible-docker

ansible-role

Last synced: 3 months ago
JSON representation

Ansible role to install Docker on Ubuntu or Debian systems.

Awesome Lists containing this project

README

        

# Ansible Docker [![Build Status](https://travis-ci.org/gmauro/ansible-docker.svg?branch=master)](https://travis-ci.org/gmauro/ansible-docker)
[Ansible](https://wwww.ansible.com) role to install [Docker-CE](http://www.docker.com) and extensions on Ubuntu or Debian systems .

## Usage

Clone this repo into your roles directory:

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

And add it to your play's roles:

```yaml
- 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.