forked from GameTactic/hcloud-k8s
-
Notifications
You must be signed in to change notification settings - Fork 1
/
k8s-install.yaml
40 lines (37 loc) · 877 Bytes
/
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
---
- 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: Local Cleanup
hosts: localhost
gather_facts: false
become: false
vars_files:
- "env/values.yaml"
roles:
- { role: local-cleanup, tags: local-cleanup }