-
Notifications
You must be signed in to change notification settings - Fork 3
/
playbook-deploy.yml
149 lines (136 loc) · 2.44 KB
/
playbook-deploy.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
- name: Wait for nodes to become available
hosts: all
any_errors_fatal: true
gather_facts: no
tasks:
- wait_for_connection:
delay: 10
timeout: 600
- action: ping
tags: wait
- name: Setup Ubuntu
hosts: all
any_errors_fatal: true
become: true
roles:
- setup_ubuntu
vars_files:
- vars/main.yml
- secrets/vars.yml
tags: ubuntu
- name: Run ubuntu updates
hosts: all
any_errors_fatal: true
become: true
roles:
- update-ubuntu
vars_files:
- vars/main.yml
- secrets/vars.yml
tags: updates
- name: Register ip at DuckDNS
hosts: duckdns
any_errors_fatal: true
become: true
roles:
- duckdns
vars_files:
- vars/main.yml
- secrets/vars.yml
tags: duckdns
- name: Install Tinc
hosts: vpn_mesh
any_errors_fatal: true
become: true
roles:
- tinc
vars_files:
- vars/main.yml
- secrets/vars.yml
tags: tinc
- name: Mount storage
hosts: all
any_errors_fatal: true
become: true
vars_files:
- vars/main.yml
- secrets/vars.yml
roles:
- mount-storage
tags:
- storage
- name: Install Glusterfs servers
hosts: glusterpool
any_errors_fatal: true
become: true
vars_files:
- vars/main.yml
- secrets/vars.yml
roles:
- glusterfs-server
tags:
- glusterfs
- glusterfs-servers
- name: Install Glusterfs clients
hosts: swarm
any_errors_fatal: true
become: true
vars_files:
- vars/main.yml
- secrets/vars.yml
roles:
- glusterfs-client
tags:
- glusterfs
- glusterfs-clients
- name: Install Docker
hosts: swarm
any_errors_fatal: true
become: true
roles:
- docker
vars_files:
- vars/main.yml
- secrets/vars.yml
tags: docker
- name: Setup Docker Swarm
hosts: swarm
any_errors_fatal: true
become: true
roles:
- swarm
vars_files:
- vars/main.yml
- secrets/vars.yml
tags: swarm
- name: Deploy stacks
hosts: managers[0]
any_errors_fatal: true
become: true
roles:
- stacks
vars_files:
- vars/main.yml
- secrets/vars.yml
tags: stacks
- name: Store registry login data on nodes
hosts: swarm
any_errors_fatal: true
become: true
roles:
- registry-login
vars_files:
- vars/main.yml
- secrets/vars.yml
tags: stacks
- name: Display urls of deployed swarm services
hosts: swarm
any_errors_fatal: true
become: true
roles:
- output-service-urls
vars_files:
- vars/main.yml
- secrets/vars.yml
tags: urls