feat: distribution is a dict and nodes and cluster are top level (#1288)
* feat: distribution is a dict and nodes and cluster are top level Signed-off-by: Devin Buhl <devin@buhl.casa> * chore: housekeeping Signed-off-by: Devin Buhl <devin@buhl.casa> --------- Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
cba35dc66a
commit
89673cd17b
55 files changed
+330
-302
No files matched your search
@@ -1 +1 @@
|
||||
main = lambda data: data.get("distribution") in ['k0s']
|
||||
main = lambda data: data.get("distribution", {}).get("type", "k3s") in ["k0s"]
|
||||
@@ -5,7 +5,7 @@ metadata:
|
||||
name: home-kubernetes
|
||||
spec:
|
||||
hosts:
|
||||
{% for item in cluster.nodes.inventory %}
|
||||
{% for item in nodes.inventory %}
|
||||
{% if item.controller %}
|
||||
- role: controller+worker
|
||||
{% else %}
|
||||
|
||||
@@ -35,8 +35,8 @@ apt-get install -y --no-install-recommends \
|
||||
chattr -i /etc/resolv.conf
|
||||
rm -f /etc/resolv.conf
|
||||
cat <<EOF > /etc/resolv.conf
|
||||
search {{ cluster.nodes.search_domain|default('.', true) }}
|
||||
{% for item in cluster.nodes.dns_servers %}
|
||||
search {{ nodes.search_domain|default('.', true) }}
|
||||
{% for item in nodes.dns_servers | default(['1.1.1.1', '1.0.0.1']) %}
|
||||
nameserver {{ item }}
|
||||
{% endfor %}
|
||||
EOF
|
||||
|
||||
Reference in new issue
Block a user