forked from protobuff3r/hcloud-k8s
-
Notifications
You must be signed in to change notification settings - Fork 2
/
k8s-install.yaml
53 lines (49 loc) · 1.21 KB
/
k8s-install.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
---
- name: Prepare Kubernetes Tools and Configuration
hosts: allserver
gather_facts: yes
remote_user: k8s
become: yes
vars_files:
- "env/values.yaml"
- "env/ips.yaml"
roles:
- { role: kube-prepare, tags: kube-prepare }
- name: Install Master-Node
hosts: master
gather_facts: yes
remote_user: k8s
become: yes
vars_files:
- "env/values.yaml"
vars:
version_1_16: "{{ kubenetes_version is version('1.16.0', operator='>=', strict=True) }}"
roles:
- { role: kube-master, tags: kube-master }
- name: Join Worker-Nodes to Master
hosts: worker
gather_facts: yes
remote_user: k8s
become: yes
roles:
- { role: kube-worker, tags: kube-worker }
- name: IP failover and Metal-LB Installation
hosts: localhost
gather_facts: false
become: false
vars_files:
- "env/values.yaml"
- "env/ips.yaml"
vars:
version_1_16: "{{ kubenetes_version is version('1.16.0', operator='>=', strict=True) }}"
roles:
- { role: ip-failover, tags: ip-failover }
- { role: metal-lb, tags: metal-lb }
- name: Local Cleanup
hosts: localhost
gather_facts: false
become: false
vars_files:
- "env/values.yaml"
roles:
- { role: local-cleanup, tags: local-cleanup }