-
-
Save tsungtwu/592ab1b71824713336a0dc3c5fbb9fc2 to your computer and use it in GitHub Desktop.
Install Docker CE on Ubuntu using Ansible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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