feat: add advanced features to config (#1208)
* feat: add advanced features to config Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: only enable longhorn if distro is k3s or k0s Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: update ansible lint Signed-off-by: Devin Buhl <devin@buhl.casa> --------- Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
0fda1f6a56
commit
1ec59d1559
87 files changed
+158
-145
No files matched your search
@@ -37,7 +37,7 @@ spec:
|
||||
before:
|
||||
- sudo bash /home/#{ item.username }#/k0s/hooks/apply-system.sh
|
||||
- sudo mv /home/#{ item.username }#/k0s/containerd/unprivileged-ports.toml /etc/k0s/containerd.d/unprivileged-ports.toml
|
||||
#% if spegel.enabled | default(false) %#
|
||||
#% if spegel|default({}) and spegel.enabled|default(false) %#
|
||||
- sudo mv /home/#{ item.username }#/k0s/containerd/spegel.toml /etc/k0s/containerd.d/spegel.toml
|
||||
#% endif %#
|
||||
reset:
|
||||
@@ -49,7 +49,7 @@ spec:
|
||||
hooks: *hooks
|
||||
#% endif %#
|
||||
#% endfor %#
|
||||
#% if bootstrap_nodes.worker | default([]) | length > 0 %#
|
||||
#% if bootstrap_nodes.worker|default([]) | length > 0 %#
|
||||
#% for item in bootstrap_nodes.worker %#
|
||||
- role: worker
|
||||
ssh:
|
||||
@@ -82,14 +82,14 @@ spec:
|
||||
api:
|
||||
sans:
|
||||
- "#{ bootstrap_kube_api_addr }#"
|
||||
#% if bootstrap_kube_api_hostname | default('') %#
|
||||
#% if bootstrap_kube_api_hostname|default('') %#
|
||||
- "#{ bootstrap_kube_api_hostname }#"
|
||||
#% endif %#
|
||||
#% for item in bootstrap_nodes.master %#
|
||||
#% if item.address != bootstrap_kube_api_addr %#
|
||||
- "#{ item.address }#"
|
||||
#% endif %#
|
||||
#% if (not bootstrap_kube_api_hostname | default('')) or (item.name != bootstrap_kube_api_hostname | default('')) %#
|
||||
#% if (not bootstrap_kube_api_hostname|default('')) or (item.name != bootstrap_kube_api_hostname|default('')) %#
|
||||
- "#{ item.name }#"
|
||||
#% endif %#
|
||||
#% endfor %#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#% if bootstrap_distribution == 'k0s' and spegel.enabled | default(false) %#
|
||||
#% if bootstrap_distribution == 'k0s' and spegel|default({}) and spegel.enabled|default(false) %#
|
||||
[plugins."io.containerd.grpc.v1.cri".registry]
|
||||
config_path = "/var/lib/k0s/containerd/certs.d"
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd]
|
||||
|
||||
@@ -16,14 +16,16 @@ apt-get install -y --no-install-recommends \
|
||||
nvme-cli open-iscsi parted psmisc python3 python3-apt python3-kubernetes python3-yaml \
|
||||
smartmontools socat software-properties-common unzip util-linux
|
||||
|
||||
#% if bootstrap_advanced_flags|default({}) and bootstrap_advanced_flags.update_resolv_conf|default(true) %#
|
||||
# Update DNS
|
||||
chattr -i /etc/resolv.conf
|
||||
rm -f /etc/resolv.conf
|
||||
cat <<EOF > /etc/resolv.conf
|
||||
search .
|
||||
nameserver #{ bootstrap_dns_server | default('1.1.1.1', true) }#
|
||||
nameserver #{ bootstrap_dns_server|default('1.1.1.1', true) }#
|
||||
EOF
|
||||
chattr +i /etc/resolv.conf
|
||||
#% endif %#
|
||||
|
||||
# Kernel Modules
|
||||
for module in br_netfilter ceph ip_vs ip_vs_rr nbd overlay rbd; do
|
||||
|
||||
Reference in new issue
Block a user