ci/cd roles

This commit is contained in:
CC
2026-05-21 16:20:22 +01:00
parent 7f679b6ae2
commit edaff5a978
2 changed files with 30 additions and 26 deletions

View File

@@ -40,12 +40,12 @@ module "vm-n8n" {
module "inventory" {
source = "./modules/proxmox_ansible_inventory"
filename = "${abspath("${path.root}/..")}/ansible/inventory/inventory.yml"
filename = "${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"
filename = "${path.root}/terraform/vm_data.yml"
instances = local.vm_created
}

View File

@@ -1,10 +1,14 @@
variable "instance_mode" {
type = string
default = "single"
description = "single or multiple"
validation {
condition = contains(["single", "multiple"], var.instance_mode)
error_message = "instance_mode must be either single or multiple."
}
}
variable "instance" {
description = "Single instance definition"
type = object({
service_name = string
vm_name = string
@@ -12,15 +16,14 @@ variable "instance" {
vm_cpu = optional(number)
vm_ram = optional(number)
vm_size = optional(string)
app_port = number
app_image = string
vm_tags = optional(list(string))
})
default = null
nullable = true
description = "Used only when instance_mode = single."
}
variable "instances" {
description = "Multiple instance definitions"
type = map(object({
service_name = string
vm_name = string
@@ -28,13 +31,14 @@ variable "instances" {
vm_cpu = optional(number)
vm_ram = optional(number)
vm_size = optional(string)
app_port = number
app_image = string
vm_tags = optional(list(string))
}))
default = {}
nullable = false
description = "Used only when instance_mode = multiple."
}
variable "vm_defaults" {
type = object({
node_datastore = string