-
Notifications
You must be signed in to change notification settings - Fork 1
/
provision.yml
73 lines (59 loc) · 1.29 KB
/
provision.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
---
- name: Pre-requisites check on all nodes
hosts: all
become: yes
roles:
- role: pre.ops/
tags: pre-ops
- role: extra.ops/cni-plugins.ops/
tags: extra-ops
when: k0s_use_custom_config
- name: Write/generate k0s config file on control plane node
hosts:
- initial_controller
- controller
gather_facts: yes
become: yes
roles:
- role: k0s.ops/configure.ops/
- name: Configure initial k0s control plane node
hosts: initial_controller
gather_facts: yes
become: yes
roles:
- role: k0s.ops/init.ops/
tags:
- k0s-ops
- init-ops
- name: Configure k0s control plane (master) nodes
hosts: controller
gather_facts: yes
become: yes
serial: 1
roles:
- role: k0s.ops/controller.ops/
tags:
- k0s-ops
- controller-ops
when: not single_node
- name: Configure k0s worker nodes
hosts: worker
become: yes
roles:
- role: k0s.ops/worker.ops/
tags:
- k0s-ops
- worker-ops
when: not single_node
- name: Install custom CNI solution
hosts: initial_controller
become: yes
tasks:
- include_tasks: "{{ playbook_dir }}/roles/extra.ops/cilium.ops/tasks/install.yml"
when:
- k0s_use_custom_config
- cni == "cilium"
- name: Export k0s kubeconfig
hosts: initial_controller
roles:
- role: post.ops/