-
Notifications
You must be signed in to change notification settings - Fork 1
/
install-docker.yml
75 lines (62 loc) · 1.61 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
- name: Install nginx
hosts: all
become: true
tasks:
- name: Install gpg key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: Add docker repo
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
state: present
- name: Update
apt:
update_cache: yes
tags: docker
- name: Install docker
apt:
name: docker-ce
state: latest
tags: docker
- name: Restart and enable docker service
service:
name: docker
state: restarted
enabled: yes
tags: docker
- name: Download docker-compose
get_url:
url: https://github.com/docker/compose/releases/download/1.23.2/docker-compose-Linux-x86_64
dest: /usr/local/bin/docker-compose
mode: 0555
tags: docker
- name: Create sym link to docker-compose
file:
src: /usr/local/bin/docker-compose
dest: /usr/bin/docker-compose
state: link
owner: root
group: root
tags: docker
- name: Download goss binary
get_url:
url: https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64
dest: /usr/local/bin/goss
- name: Change goss permissions
file:
path: /usr/local/bin/goss
owner: root
group: root
mode: '0555'
- name: Download dgoss binary
get_url:
url: https://github.com/aelsabbahy/goss/releases/latest/download/dgoss
dest: /usr/local/bin/dgoss
- name: Change dgoss permissions
file:
path: /usr/local/bin/dgoss
owner: root
group: root
mode: '0555'