ci: initial cluster state
This commit is contained in:
commit
3b54d183c5
8 changed files with 500 additions and 0 deletions
18
tofu/outputs.tf
Normal file
18
tofu/outputs.tf
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
output "server_ip" {
|
||||
description = "IP address of the K3s server node."
|
||||
value = libvirt_domain.server.network_interface[0].addresses[0]
|
||||
}
|
||||
|
||||
output "agent_ips" {
|
||||
description = "List of IP addresses of the K3s agent nodes."
|
||||
value = [libvirt_domain.agent.network_interface[0].addresses[0]]
|
||||
}
|
||||
|
||||
resource "local_file" "ansible_inventory" {
|
||||
content = templatefile("${path.module}/inventory.ini.tpl", {
|
||||
server_ip = libvirt_domain.server.network_interface[0].addresses[0]
|
||||
agent_ips = [libvirt_domain.agent.network_interface[0].addresses[0]]
|
||||
ssh_user = var.vm_user
|
||||
})
|
||||
filename = "../ansible/inventory.ini"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue