Skip to content

Instantly share code, notes, and snippets.

@petarnikolovski
Created December 9, 2018 18:46
Show Gist options
  • Save petarnikolovski/d3a9b080d6b3f1149104b10a81921635 to your computer and use it in GitHub Desktop.
Save petarnikolovski/d3a9b080d6b3f1149104b10a81921635 to your computer and use it in GitHub Desktop.
Install Docker CE on Ubuntu 18.04 using Ansible 2.7
- name: Install Docker
hosts: all
become: yes
tasks:
- name: Install Docker dependencies
apt:
pkg:
- apt-transport-https
- ca-certificates
- software-properties-common
state: present
update_cache: yes
- name: Add GPG key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: Add stable Docker repository
apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
state: present
update_cache: yes
- name: Install latest Docker CE
apt:
pkg:
- docker-ce
state: present
update_cache: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment