ci: add changed config
This commit is contained in:
parent
5c57494895
commit
5e85050e79
8 changed files with 260 additions and 36 deletions
15
tofu/outputs
Normal file
15
tofu/outputs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
output "server_ip" {
|
||||
value = libvirt_domain.server.network_interface[0].addresses[0]
|
||||
}
|
||||
output "agent_ips" {
|
||||
value = [for i in range(var.agent_count) : libvirt_domain.agent[i].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 = [for i in range(var.agent_count) : libvirt_domain.agent[i].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