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.
- Host: GitHub
- URL: https://github.com/gmauro/ansible-docker
- Owner: gmauro
- Created: 2017-08-29T14:31:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-14T12:32:51.000Z (about 6 years ago)
- Last Synced: 2025-02-03T11:14:30.793Z (4 months ago)
- Topics: ansible-role
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ansible Docker [](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: yourhostroles:
- 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.