n8n ansible base

This commit is contained in:
CC
2026-05-21 13:12:12 +01:00
parent db9cc7909b
commit 089b099f7f
10 changed files with 152 additions and 18 deletions

View File

@@ -2,6 +2,20 @@ locals {
instance_map = var.instance_mode == "single" ? {
main = var.instance
} : var.instances
vm_created = {
for k, v in local.instance_map :
k => {
service_name = v.service_name
vm_name = v.vm_name
node_name = v.node_name
ipv4_address = module.vm[k].vm_ipv4_address
vm_tags = concat(
try(v.vm_tags, []),
["terraform", "docker", v.service_name, "ip-${replace(module.vm[k].vm_ipv4_address, ".", "-")}"]
)
}
}
}
module "vm-n8n" {
@@ -23,3 +37,15 @@ module "vm-n8n" {
)
vm_user_sshkey = var.vm_defaults.vm_user_sshkey
}
module "inventory" {
source = "./modules/proxmox_ansible_inventory"
filename = "${path.module}/ansible/inventory/inventory.yml"
instances = local.vm_created
}
module "vm_data" {
source = "./modules/proxmox_vm_data"
filename = "${path.module}/terraform/vm_data.yml"
instances = local.vm_created
}