new vars pass docker compose in cloud init

This commit is contained in:
CC
2026-09-12 15:33:40 +01:00
parent fbb2a53e23
commit 5fb9824444
6 changed files with 62 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
module "vm-music" {
module "proxmox_ubuntu_cloudinit_clone" {
for_each = local.instance_map
source = "./modules/proxmox_ubuntu_cloudinit_clone"
@@ -16,16 +16,18 @@ module "vm-music" {
["terraform", "docker", each.value.service_name]
)
vm_user_sshkey = var.vm_defaults.vm_user_sshkey
compose_file_content = file("${path.root}/../compose/docker-compose.yml")
env_file_content = file("${path.root}/../compose/.env")
}
module "inventory" {
source = "./modules/proxmox_ansible_inventory"
filename = "${abspath("${path.root}/..")}/ansible/inventory/inventory.yml"
instances = local.vm_created
}
# module "inventory" {
# source = "./modules/proxmox_ansible_inventory"
# filename = "${abspath("${path.root}/..")}/ansible/inventory/inventory.yml"
# instances = local.vm_created
# }
module "vm_data" {
source = "./modules/proxmox_vm_data"
filename = "${abspath("${path.root}/..")}/terraform/vm_data.yml"
instances = local.vm_created
}
# module "vm_data" {
# source = "./modules/proxmox_vm_data"
# filename = "${abspath("${path.root}/..")}/terraform/vm_data.yml"
# instances = local.vm_created
# }