Update InstallDocker.yml
Not finished yet.
This commit is contained in:
parent
bd95a6df37
commit
769fc57791
@ -3,4 +3,42 @@
|
|||||||
hosts: linux
|
hosts: linux
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
- 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
|
Loading…
Reference in New Issue
Block a user