-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.yaml
66 lines (59 loc) · 1.36 KB
/
bootstrap.yaml
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
---
# Install prerequisites on all machines
- hosts: cluster
any_errors_fatal: true
roles:
- { role: check-os }
- { role: safe-os-upgrade }
- { role: containerd }
- { role: k8s-preinstall }
# Configure master
- hosts: master
any_errors_fatal: true
roles:
- { role: k8s-master, tags: master }
- { role: k8s-flannel, tags: master }
- { role: k8s-fetch-config, tags: master }
# Configure nodes
- hosts: node
any_errors_fatal: true
roles:
- { role: k8s-node, tags: node }
# Setup addons if any
- hosts: master
any_errors_fatal: true
tasks:
- name: "Metrics server"
include_role:
name: k8s-metrics-server
when: addons.metrics_server
run_once: yes
tags: metrics-server
- name: "Project contour"
include_role:
name: k8s-contour
when: addons.projectcontour.enabled
run_once: yes
tags: contour
- name: "Open EBS"
include_role:
name: k8s-openebs
when: addons.openebs
run_once: yes
tags: openebs
- hosts: node
any_errors_fatal: true
tasks:
- name: "Keepalived"
include_role:
name: keepalived
when: addons.keepalived.enabled
tags: keepalived
# Setup firewall
- hosts: cluster
any_errors_fatal: true
tasks:
- name: "Firewall"
include_role:
name: firewall
when: firewall.enabled