diff options
| author | clyhtsuriva <aimeric@adjutor.xyz> | 2025-02-03 17:21:58 +0100 | 
|---|---|---|
| committer | clyhtsuriva <aimeric@adjutor.xyz> | 2025-02-03 17:21:58 +0100 | 
| commit | 4e2703c52026009c34e8dcb8294b50881f9152f8 (patch) | |
| tree | c125c5405bfadb2eb802b2b3c12486274815b293 /opentofu/inventory.tf | |
| parent | 6135497b6b4837cb8bd65bc093b48ef6a14fbf7d (diff) | |
opentofu: add kubespray submodule to deploy via ansible
Not working yet, getting : "msg": "Ansible must be between 2.16.4 and 2.17.0 exclusive - you have 2.17.5"
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 +}  | 
