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:
29
inventory.ini.tftpl
Normal file
29
inventory.ini.tftpl
Normal 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
|
||||
Reference in New Issue
Block a user