fix: update boot_iso section, fix var names, and pin proxmox plugin version

This commit is contained in:
AJ Schroeder
2025-06-10 15:19:44 -05:00
parent f87e61ab80
commit cf8f643f0a
30 changed files with 334 additions and 139 deletions

View File

@@ -7,7 +7,7 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.11.0" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
@@ -18,7 +18,7 @@ packer {
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.1.8" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -122,12 +122,14 @@ source "proxmox-iso" "linux-almalinux" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -136,13 +138,11 @@ source "proxmox-iso" "linux-almalinux" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -155,6 +155,7 @@ source "proxmox-iso" "linux-almalinux" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -162,6 +163,12 @@ source "proxmox-iso" "linux-almalinux" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,7 +7,7 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.11.0" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
@@ -18,7 +18,7 @@ packer {
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.1.8" version = ">= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -122,12 +122,14 @@ source "proxmox-iso" "linux-almalinux" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -136,13 +138,11 @@ source "proxmox-iso" "linux-almalinux" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -155,6 +155,7 @@ source "proxmox-iso" "linux-almalinux" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -162,6 +163,12 @@ source "proxmox-iso" "linux-almalinux" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,18 +7,18 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.9.1" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
version = "~> 1" version = "~> 1"
} }
git = { git = {
version = ">= 0.4.2" version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.0.6" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -121,12 +121,14 @@ source "proxmox-iso" "linux-centos-stream" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -135,13 +137,11 @@ source "proxmox-iso" "linux-centos-stream" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -154,6 +154,7 @@ source "proxmox-iso" "linux-centos-stream" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -161,6 +162,12 @@ source "proxmox-iso" "linux-centos-stream" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,18 +7,18 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.9.1" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
version = "~> 1" version = "~> 1"
} }
git = { git = {
version = ">= 0.4.2" version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.0.6" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -121,12 +121,14 @@ source "proxmox-iso" "linux-centos-stream" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -135,13 +137,11 @@ source "proxmox-iso" "linux-centos-stream" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -154,6 +154,7 @@ source "proxmox-iso" "linux-centos-stream" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -161,6 +162,12 @@ source "proxmox-iso" "linux-centos-stream" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,18 +7,18 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.9.1" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
version = "~> 1" version = "~> 1"
} }
git = { git = {
version = ">= 0.4.2" version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.0.6" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -144,12 +144,14 @@ source "proxmox-iso" "debian" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -158,13 +160,11 @@ source "proxmox-iso" "debian" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -177,6 +177,7 @@ source "proxmox-iso" "debian" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -184,6 +185,12 @@ source "proxmox-iso" "debian" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,18 +7,18 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.9.1" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
version = "~> 1" version = "~> 1"
} }
git = { git = {
version = ">= 0.4.2" version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.0.6" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -143,12 +143,14 @@ source "proxmox-iso" "debian" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -157,13 +159,11 @@ source "proxmox-iso" "debian" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -176,6 +176,7 @@ source "proxmox-iso" "debian" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -183,6 +184,12 @@ source "proxmox-iso" "debian" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,18 +7,18 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.9.1" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
version = "~> 1" version = "~> 1"
} }
git = { git = {
version = ">= 0.4.2" version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.1.6" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -126,12 +126,14 @@ source "proxmox-iso" "linux-opensuse-leap" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -140,13 +142,11 @@ source "proxmox-iso" "linux-opensuse-leap" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -159,6 +159,7 @@ source "proxmox-iso" "linux-opensuse-leap" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -166,6 +167,12 @@ source "proxmox-iso" "linux-opensuse-leap" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,18 +7,18 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.9.1" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
version = "~> 1" version = "~> 1"
} }
git = { git = {
version = ">= 0.4.2" version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.1.6" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -119,12 +119,14 @@ source "proxmox-iso" "linux-opensuse-leap" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -133,13 +135,11 @@ source "proxmox-iso" "linux-opensuse-leap" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -152,6 +152,7 @@ source "proxmox-iso" "linux-opensuse-leap" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -159,6 +160,12 @@ source "proxmox-iso" "linux-opensuse-leap" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,7 +7,7 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.11.0" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
@@ -18,7 +18,7 @@ packer {
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.1.8" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -122,12 +122,14 @@ source "proxmox-iso" "linux-oracle" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -136,13 +138,11 @@ source "proxmox-iso" "linux-oracle" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -155,6 +155,7 @@ source "proxmox-iso" "linux-oracle" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -162,6 +163,12 @@ source "proxmox-iso" "linux-oracle" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,7 +7,7 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.11.0" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
@@ -18,7 +18,7 @@ packer {
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.1.8" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -122,12 +122,14 @@ source "proxmox-iso" "linux-oracle" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -136,13 +138,11 @@ source "proxmox-iso" "linux-oracle" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -155,6 +155,7 @@ source "proxmox-iso" "linux-oracle" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -162,6 +163,12 @@ source "proxmox-iso" "linux-oracle" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,18 +7,18 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.9.1" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
version = "~> 1" version = "~> 1"
} }
git = { git = {
version = ">= 0.4.2" version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.0.6" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -122,12 +122,14 @@ source "proxmox-iso" "linux-rocky" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -136,13 +138,11 @@ source "proxmox-iso" "linux-rocky" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -155,6 +155,7 @@ source "proxmox-iso" "linux-rocky" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -162,6 +163,12 @@ source "proxmox-iso" "linux-rocky" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,18 +7,18 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.9.1" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
version = "~> 1" version = "~> 1"
} }
git = { git = {
version = ">= 0.4.2" version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.0.6" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -122,12 +122,14 @@ source "proxmox-iso" "linux-rocky" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -136,13 +138,11 @@ source "proxmox-iso" "linux-rocky" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -155,6 +155,7 @@ source "proxmox-iso" "linux-rocky" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -162,6 +163,12 @@ source "proxmox-iso" "linux-rocky" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,18 +7,18 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.9.1" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
version = "~> 1" version = "~> 1"
} }
git = { git = {
version = ">= 0.4.2" version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.0.6" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -129,12 +129,14 @@ source "proxmox-iso" "ubuntu" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -143,13 +145,11 @@ source "proxmox-iso" "ubuntu" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -162,6 +162,7 @@ source "proxmox-iso" "ubuntu" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -169,6 +170,12 @@ source "proxmox-iso" "ubuntu" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,18 +7,18 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.9.1" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
version = "~> 1" version = "~> 1"
} }
git = { git = {
version = ">= 0.4.2" version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.0.6" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -125,12 +125,14 @@ source "proxmox-iso" "ubuntu" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -139,13 +141,11 @@ source "proxmox-iso" "ubuntu" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -158,6 +158,7 @@ source "proxmox-iso" "ubuntu" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -165,6 +166,12 @@ source "proxmox-iso" "ubuntu" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."

View File

@@ -7,18 +7,18 @@
// The Packer configuration. // The Packer configuration.
packer { packer {
required_version = ">= 1.9.1" required_version = ">= 1.12.0"
required_plugins { required_plugins {
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
version = "~> 1" version = "~> 1"
} }
git = { git = {
version = ">= 0.4.2" version = ">= 0.6.2"
source = "github.com/ethanmdavidson/git" source = "github.com/ethanmdavidson/git"
} }
proxmox = { proxmox = {
version = ">= 1.0.6" version = "= 1.2.1"
source = "github.com/hashicorp/proxmox" source = "github.com/hashicorp/proxmox"
} }
} }
@@ -125,12 +125,14 @@ source "proxmox-iso" "ubuntu" {
memory = "${var.vm_mem_size}" memory = "${var.vm_mem_size}"
os = "${var.vm_os_type}" os = "${var.vm_os_type}"
scsi_controller = "${var.vm_disk_controller_type}" scsi_controller = "${var.vm_disk_controller_type}"
disks { disks {
disk_size = "${var.vm_disk_size}" disk_size = "${var.vm_disk_size}"
type = "${var.vm_disk_type}" type = "${var.vm_disk_type}"
storage_pool = "${var.vm_storage_pool}" storage_pool = "${var.vm_storage_pool}"
format = "${var.vm_disk_format}" format = "${var.vm_disk_format}"
} }
dynamic "efi_config" { dynamic "efi_config" {
for_each = var.vm_bios == "ovmf" ? [1] : [] for_each = var.vm_bios == "ovmf" ? [1] : []
content { content {
@@ -139,13 +141,11 @@ source "proxmox-iso" "ubuntu" {
pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null pre_enrolled_keys = var.vm_bios == "ovmf" ? var.vm_efi_pre_enrolled_keys : null
} }
} }
unmount_iso = true
ssh_username = "${var.build_username}" ssh_username = "${var.build_username}"
ssh_password = "${var.build_password}" ssh_password = "${var.build_password}"
ssh_timeout = "${var.timeout}" ssh_timeout = "${var.timeout}"
ssh_port = "22" ssh_port = "22"
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
iso_checksum = "${var.iso_checksum}"
qemu_agent = true qemu_agent = true
network_adapters { network_adapters {
@@ -158,6 +158,7 @@ source "proxmox-iso" "ubuntu" {
http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null http_content = "${var.common_data_source}" == "http" ? "${local.data_source_content}" : null
// Boot and Provisioning Settings // Boot and Provisioning Settings
http_interface = var.common_data_source == "http" ? var.common_http_interface : null
http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null http_bind_address = var.common_data_source == "http" ? var.common_http_bind_address : null
http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null http_port_min = var.common_data_source == "http" ? var.common_http_port_min : null
http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null http_port_max = var.common_data_source == "http" ? var.common_http_port_max : null
@@ -165,6 +166,12 @@ source "proxmox-iso" "ubuntu" {
boot_wait = var.vm_boot_wait boot_wait = var.vm_boot_wait
boot_command = local.boot_command boot_command = local.boot_command
boot_iso {
iso_file = "${var.common_iso_storage}:${var.iso_path}/${var.iso_file}"
unmount = true
iso_checksum = "${var.iso_checksum}"
}
dynamic "additional_iso_files" { dynamic "additional_iso_files" {
for_each = var.common_data_source == "disk" ? [1] : [] for_each = var.common_data_source == "disk" ? [1] : []
content { content {

View File

@@ -215,6 +215,12 @@ variable "common_http_bind_address" {
default = null default = null
} }
variable "common_http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from. Defaults to the first non loopback interface."
default = null
}
variable "common_http_port_min" { variable "common_http_port_min" {
type = number type = number
description = "The start of the HTTP port range." description = "The start of the HTTP port range."