Use ansible galaxy to install docker

This commit is contained in:
Jake Howard
2020-03-02 19:37:11 +00:00
parent 1af9fd508f
commit 85f6f59970
6 changed files with 15 additions and 21 deletions

View File

@ -1,27 +1,8 @@
- name: Add docker apt key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
become: true
become_user: root
- name: Add docker repo
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
state: present
become: true
become_user: root
- name: Install Docker and docker-compose
- name: Install docker-compose
apt:
name: "{{ item }}"
name: "docker-compose"
become: true
become_user: root
loop:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-compose
- name: Create docker user
user: