From 769fc577917419b0677aac1436d2cfb4067ed3fe Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Sat, 6 Apr 2019 12:18:44 -0700 Subject: [PATCH] Update InstallDocker.yml Not finished yet. --- playbook/linux/InstallDocker.yml | 40 +++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/playbook/linux/InstallDocker.yml b/playbook/linux/InstallDocker.yml index c86fe13..b48ae8c 100644 --- a/playbook/linux/InstallDocker.yml +++ b/playbook/linux/InstallDocker.yml @@ -3,4 +3,42 @@ hosts: linux tasks: - \ No newline at end of file + - name: Check if Docker is installed + #failed_when: "'Failed' Docker was already installed." + apt: + name: docker + state: absent + + - name: Install dependancies + become: true + become_method: sudo + apt: + name: install apt-transport-https ca-certificates curl gnupg-agent software-properties-common + state: absent + + - name: Install Docker GPG key + become: true + become_method: sudo + apt_key: + url: https://download.docker.com/linux/ubuntu/gpg + state: present + id: 0EBFCD88 + + - name: Install Docker Repo + become: true + become_method: sudo + apt_repository: + repo: https://download.docker.com/linux/ubuntu/dists/bionic/stable/binary-amd64/ + state: present + + - name: Update Repos + become: true + become_method: sudo + apt: + update_cache: yes + + - name: Install Docker + become: true + become_method: sudo + apt: + name: docker-ce docker-ce-cli containerd.io \ No newline at end of file