-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinventory-sample.yaml
107 lines (106 loc) · 3.79 KB
/
inventory-sample.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
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
# This file is explicitly excluded from the general LICENSE of this project.
# Instead this file is licensed by the
#
# MIT License
#
# Copyright (c) 2021 Maximilian Fischer
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
all:
vars:
wireguard_interface: wg0
users: # All (new) sudoers users
- name: ""
sshkeys: "ssh-rsa KEX COMMENT"
REPOSITORY: "https://github.com/fischerscode/my-k3s"
base_domain: cluster.test # The default domain that is used to publish websites.
hosts:
host1:
ansible_host:
externalIPv4: # Might be the same as ansible_host
internalIPv4:
externalIPv6:
internalIPv6:
root_password: # Use ansible-vault
host2:
ansible_host:
externalIPv4: # Might be the same as ansible_host
internalIPv4:
externalIPv6:
internalIPv6:
root_password: # Use ansible-vault
host3:
ansible_host:
externalIPv4: # Might be the same as ansible_host
internalIPv4:
externalIPv6:
internalIPv6:
root_password: # Use ansible-vault
host4:
ansible_host:
externalIPv4: # Might be the same as ansible_host
internalIPv4:
externalIPv6:
internalIPv6:
root_password: # Use ansible-vault
host5:
ansible_host:
externalIPv4: # Might be the same as ansible_host
internalIPv4:
externalIPv6:
internalIPv6:
root_password: # Use ansible-vault
children:
k8s-cluster:
children:
kube-master:
hosts: host[1:3]
kube-node:
hosts: host[4:5]
vars:
k3sToken: #The secret token used by k3s. Use ansible-vault
kubernetes_api_public_address: #The public IP of the load balanced api server
node_network: 10.1.0.0/24 #The vpn network of the nodes
cluster_cidr: 10.42.0.0/16 #Network CIDR to use for pod IPs
service_cidr: 10.43.0.0/16 #Network CIDR to use for services IPs
cluster_dns: 10.43.0.10 #Cluster IP for coredns service. Should be in your service_cidr range
cluster_domain: "cluster.local" #Cluster Domain
k8s-storage:
hosts:
host1:
storageDisk: # The device/partition to use for metallb
host2:
storageDisk: # The device/partition to use for metallb
host3:
storageDisk: # The device/partition to use for metallb
host4:
storageDisk: # The device/partition to use for metallb
host5:
storageDisk: # The device/partition to use for metallb
vpn:
children:
k8s-cluster:
vars:
wireguard_address_ipv4: "{{ internalIPv4 }}/32"
wireguard_address_ipv6: "{{ internalIPv6 }}/128"
wireguard_endpoint: "{{ externalIPv4 }}"
wireguard_port: 51820
wireguard_persistent_keepalive: "30"
dns:
hosts: host[1:3]