diff options
Diffstat (limited to 'opentofu/inventory.tf')
-rw-r--r-- | opentofu/inventory.tf | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/opentofu/inventory.tf b/opentofu/inventory.tf new file mode 100644 index 0000000..ddf3ba4 --- /dev/null +++ b/opentofu/inventory.tf @@ -0,0 +1,18 @@ +resource "local_file" "ansible_inventory" { + filename = "${path.module}/inventory.ini" + content = <<-EOT + [kube_control_plane] + ${proxmox_vm_qemu.k8s_cp.default_ipv4_address} + + [etcd] + ${proxmox_vm_qemu.k8s_cp.default_ipv4_address} + + [kube_node] + %{for vm in proxmox_vm_qemu.k8s_worker[*]}${vm.default_ipv4_address} + %{endfor} + + [k8s_cluster:children] + kube_control_plane + kube_node + EOT +} |