Skip to content

Instantly share code, notes, and snippets.

@zeroc0d3
Forked from rbq/docker.yaml
Created January 15, 2019 07:19
Show Gist options
  • Select an option

  • Save zeroc0d3/0f38e4d02bc0290e75000fd7acb668a0 to your computer and use it in GitHub Desktop.

Select an option

Save zeroc0d3/0f38e4d02bc0290e75000fd7acb668a0 to your computer and use it in GitHub Desktop.
Install Docker CE on Ubuntu using Ansible
---
- hosts: all
tasks:
- name: Install prerequisites
apt: name={{item}} update_cache=yes
with_items:
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
- name: Add Docker GPG key
apt_key: url=https://download.docker.com/linux/ubuntu/gpg
- name: Add Docker APT repository
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ansible_distribution_release}} stable
- name: Install Docker
apt: name=docker-ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment