ceph-installer/terraform/ceph-gen-inventory.tf

12 lines
402 B
Terraform
Raw Permalink Normal View History

2024-01-27 23:26:11 +03:00
# 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"
}