Move configuration of servers completely to ansible

With this change we no longer use user-data scripts on the provided
machines. That makes it way easier for me to handle all the
configuration, since I only have to run ansible. Furthermore this the
burdon to think what may went wrong, since ansible is easier to debug
than some arbitrary scripts which run at provisioning-time on the
machines.

With this change I should also think about restructuring the code a bit
as well. Since it's actually easier to provide the initial
software-stack for the cluster via ansible than via terraform, at least
as far as I can tell right now.
This commit is contained in:
2025-09-18 20:32:43 +02:00
parent fda7cac5c0
commit 4beb9e2844
17 changed files with 145 additions and 54 deletions

View File

@@ -59,8 +59,10 @@ module "k8s" {
resource "local_file" "ansible_inventory" {
filename = "${path.module}/../k3s/inventory.ini"
content = templatefile("./inventory.ini.tftpl", {
server_ips = module.k8s.server_ips_v4,
agent_ips = module.k8s.agent_ips_v4,
server_ips = module.k8s.server_ips_v4,
agent_ips = module.k8s.agent_ips_v4,
network_cidr = module.k8s.private_network_cidr,
private_nat = module.k8s.private_network_nat,
})
}