Setup k3s with the help of ansible after the infra-provisioning

This change is huge! It allows me to manage the k3s installation on the
hetzner-cloud I setup via terraform.
This commit is contained in:
2025-09-15 04:12:20 +02:00
parent d083b9d446
commit dfcdc9797a
13 changed files with 364 additions and 32 deletions

29
inventory.ini.tftpl Normal file
View File

@@ -0,0 +1,29 @@
[server]
%{for ip in server_ips~}
${ip}
%{endfor~}
[server:vars]
ansible_user=root
ansible_ssh_common_args='-o StrictHostKeyChecking=accept-new'
%{if length(server_ips) > 0~}
api_endpoint=${server_ips[0]}
%{endif~}
k3s_version=${k3s_version}
[agent]
%{for ip in agent_ips~}
${ip}
%{endfor~}
[agent:vars]
ansible_user=root
%{if length(server_ips) > 0~}
ansible_ssh_common_args='-o StrictHostKeyChecking=accept-new -o ProxyCommand="ssh -p 22 -W %h:%p -q root@${server_ips[0]}"'
api_endpoint=${server_ips[0]}
%{endif~}
k3s_version=${k3s_version}
[k3s_cluster:children]
server
agent