ceph-installer/terraform/ceph-gen-inventory.tf
2024-01-27 23:26:11 +03:00

12 lines
402 B
HCL

# generate inventory file for Ansible
resource "local_file" "ansible_inventory" {
content = templatefile(
"hosts.j2",
{
cephmons = {for key, value in lxd_instance.ceph-mon : value.name => value.ipv4_address }
cephosds = {for key, value in lxd_instance.ceph-osd : value.name => value.ipv4_address }
jumphost = var.ansible_jumphost
}
)
filename = "../data/inventory"
}