-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-docker.yml
44 lines (36 loc) · 1.09 KB
/
install-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
- name: Update apt and install packages
apt:
name: "{{item}}"
# update_cache: "yes"
loop:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- python3
- python3-pip
- python-docker
- name: Update all packages to their latest version
apt:
name: "*"
state: latest
- name: Add Docker GPG apt Key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: Add Docker Repository
apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: present
- name: Install Docker
apt:
name: "docker-ce"
state: present
update_cache: "yes"
- name: install docker compose
get_url:
url: https://github.com/docker/compose/releases/download/1.27.3/docker-compose-Linux-x86_64
dest: /usr/local/bin/docker-compose
mode: 755