diff --git a/Almalinux/almalinux-10.pkr.hcl b/Almalinux/almalinux-10.pkr.hcl index 6594351..ada79d3 100644 --- a/Almalinux/almalinux-10.pkr.hcl +++ b/Almalinux/almalinux-10.pkr.hcl @@ -1,3 +1,8 @@ +variable "proxmox_host" { + type = string + default = "proxmox.example.com" +} + variable "proxmox_apiuser" { type = string default = "packer" @@ -8,6 +13,11 @@ variable "proxmox_apitoken" { default = "changeme" } +variable "proxmox_disk_storage" { + type = string + default = "packer" +} + source "proxmox-iso" "almalinux-10" { template_name = "almalinux-10" template_description = "Almalinux 10.0, generated on ${timestamp()}" @@ -28,7 +38,7 @@ source "proxmox-iso" "almalinux-10" { scsi_controller = "virtio-scsi-single" disks { disk_size = "30G" - storage_pool = "templates" + storage_pool = "${var.proxmox_disk_storage}" type = "scsi" format = "qcow2" } @@ -37,7 +47,7 @@ source "proxmox-iso" "almalinux-10" { model = "virtio" } - proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/" + proxmox_url = "https://${var.proxmox_host}:8006/api2/json/" insecure_skip_tls_verify = true username = "${var.proxmox_apiuser}" password = "${var.proxmox_apitoken}" diff --git a/Almalinux/almalinux-9.pkr.hcl b/Almalinux/almalinux-9.pkr.hcl index 4a1d010..7acab95 100644 --- a/Almalinux/almalinux-9.pkr.hcl +++ b/Almalinux/almalinux-9.pkr.hcl @@ -1,3 +1,8 @@ +variable "proxmox_host" { + type = string + default = "proxmox.example.com" +} + variable "proxmox_apiuser" { type = string default = "packer" @@ -8,6 +13,11 @@ variable "proxmox_apitoken" { default = "changeme" } +variable "proxmox_disk_storage" { + type = string + default = "packer" +} + source "proxmox-iso" "almalinux-9" { template_name = "almalinux-9" template_description = "Almalinux 9.6, generated on ${timestamp()}" @@ -28,7 +38,7 @@ source "proxmox-iso" "almalinux-9" { scsi_controller = "virtio-scsi-single" disks { disk_size = "30G" - storage_pool = "templates" + storage_pool = "${var.proxmox_disk_storage}" type = "scsi" format = "qcow2" } @@ -37,7 +47,7 @@ source "proxmox-iso" "almalinux-9" { model = "virtio" } - proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/" + proxmox_url = "https://${var.proxmox_host}:8006/api2/json/" insecure_skip_tls_verify = true username = "${var.proxmox_apiuser}" password = "${var.proxmox_apitoken}" diff --git a/Debian/debian-12.pkr.hcl b/Debian/debian-12.pkr.hcl index 35da657..850e85e 100644 --- a/Debian/debian-12.pkr.hcl +++ b/Debian/debian-12.pkr.hcl @@ -1,3 +1,8 @@ +variable "proxmox_host" { + type = string + default = "proxmox.example.com" +} + variable "proxmox_apiuser" { type = string default = "packer" @@ -8,6 +13,11 @@ variable "proxmox_apitoken" { default = "changeme" } +variable "proxmox_disk_storage" { + type = string + default = "packer" +} + source "proxmox-iso" "debian-12" { template_name = "debian-12" template_description = "Debian 12.9, generated on ${timestamp()}" @@ -28,7 +38,7 @@ source "proxmox-iso" "debian-12" { scsi_controller = "virtio-scsi-single" disks { disk_size = "30G" - storage_pool = "templates" + storage_pool = "${var.proxmox_disk_storage}" type = "scsi" format = "qcow2" } @@ -37,7 +47,7 @@ source "proxmox-iso" "debian-12" { model = "virtio" } - proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/" + proxmox_url = "https://${var.proxmox_host}:8006/api2/json/" insecure_skip_tls_verify = true username = "${var.proxmox_apiuser}" password = "${var.proxmox_apitoken}" diff --git a/Debian/debian-13.pkr.hcl b/Debian/debian-13.pkr.hcl index 49b05f6..6dac9c4 100644 --- a/Debian/debian-13.pkr.hcl +++ b/Debian/debian-13.pkr.hcl @@ -1,3 +1,8 @@ +variable "proxmox_host" { + type = string + default = "proxmox.example.com" +} + variable "proxmox_apiuser" { type = string default = "packer" @@ -8,6 +13,11 @@ variable "proxmox_apitoken" { default = "changeme" } +variable "proxmox_disk_storage" { + type = string + default = "packer" +} + source "proxmox-iso" "debian-13" { template_name = "debian-13" template_description = "Debian 13.0, generated on ${timestamp()}" @@ -28,7 +38,7 @@ source "proxmox-iso" "debian-13" { scsi_controller = "virtio-scsi-single" disks { disk_size = "30G" - storage_pool = "templates" + storage_pool = "${var.proxmox_disk_storage}" type = "scsi" format = "qcow2" } @@ -37,7 +47,7 @@ source "proxmox-iso" "debian-13" { model = "virtio" } - proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/" + proxmox_url = "https://${var.proxmox_host}:8006/api2/json/" insecure_skip_tls_verify = true username = "${var.proxmox_apiuser}" password = "${var.proxmox_apitoken}" diff --git a/FreeBSD/freebsd-14.pkr.hcl b/FreeBSD/freebsd-14.pkr.hcl index dd3156e..62d1087 100644 --- a/FreeBSD/freebsd-14.pkr.hcl +++ b/FreeBSD/freebsd-14.pkr.hcl @@ -1,3 +1,8 @@ +variable "proxmox_host" { + type = string + default = "proxmox.example.com" +} + variable "proxmox_apiuser" { type = string default = "packer" @@ -8,6 +13,11 @@ variable "proxmox_apitoken" { default = "changeme" } +variable "proxmox_disk_storage" { + type = string + default = "packer" +} + source "proxmox-iso" "freebsd-14" { template_name = "freebsd-14" template_description = "FreeBSD 14.3, generated on ${timestamp()}" @@ -24,7 +34,7 @@ source "proxmox-iso" "freebsd-14" { scsi_controller = "virtio-scsi-single" disks { disk_size = "30G" - storage_pool = "templates" + storage_pool = "${var.proxmox_disk_storage}" type = "scsi" format = "qcow2" } @@ -33,7 +43,7 @@ source "proxmox-iso" "freebsd-14" { model = "virtio" } - proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/" + proxmox_url = "https://${var.proxmox_host}:8006/api2/json/" insecure_skip_tls_verify = true username = "${var.proxmox_apiuser}" password = "${var.proxmox_apitoken}" diff --git a/FreeBSD/freebsd-15.pkr.hcl b/FreeBSD/freebsd-15.pkr.hcl index f66fc22..fc656cd 100644 --- a/FreeBSD/freebsd-15.pkr.hcl +++ b/FreeBSD/freebsd-15.pkr.hcl @@ -1,3 +1,8 @@ +variable "proxmox_host" { + type = string + default = "proxmox.example.com" +} + variable "proxmox_apiuser" { type = string default = "packer" @@ -8,6 +13,11 @@ variable "proxmox_apitoken" { default = "changeme" } +variable "proxmox_disk_storage" { + type = string + default = "packer" +} + source "proxmox-iso" "freebsd-15" { template_name = "freebsd-15" template_description = "FreeBSD 15.1, generated on ${timestamp()}" @@ -19,7 +29,7 @@ source "proxmox-iso" "freebsd-15" { "mdmfs -s 100m md /tmp", # mount a writable /tmp memory disk "mdmfs -s 100m md /var/db", # mount a writable /var memory disk "dhclient vtnet0", # bring up network - "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-15-installerconfig", # grab the installerconfig + "fetch -o /tmp/instaproxmox_hostllerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-15-installerconfig", # grab the installerconfig "bsdinstall script /tmp/installerconfig" # execute bsdinstall with fetched config ] @@ -35,7 +45,7 @@ source "proxmox-iso" "freebsd-15" { scsi_controller = "virtio-scsi-single" disks { disk_size = "30G" - storage_pool = "templates" + storage_pool = "${var.proxmox_disk_storage}" type = "scsi" format = "qcow2" } @@ -44,7 +54,7 @@ source "proxmox-iso" "freebsd-15" { model = "virtio" } - proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/" + proxmox_url = "https://${var.proxmox_host}:8006/api2/json/" insecure_skip_tls_verify = true username = "${var.proxmox_apiuser}" password = "${var.proxmox_apitoken}" diff --git a/Rocky/rocky-10.pkr.hcl b/Rocky/rocky-10.pkr.hcl index 72594c8..0ce4fdf 100644 --- a/Rocky/rocky-10.pkr.hcl +++ b/Rocky/rocky-10.pkr.hcl @@ -1,3 +1,8 @@ +variable "proxmox_host" { + type = string + default = "proxmox.example.com" +} + variable "proxmox_apiuser" { type = string default = "packer" @@ -8,6 +13,11 @@ variable "proxmox_apitoken" { default = "changeme" } +variable "proxmox_disk_storage" { + type = string + default = "packer" +} + source "proxmox-iso" "rocky-10" { template_name = "rocky-10" template_description = "Rocky Linux 10.0, generated on ${timestamp()}" @@ -28,7 +38,7 @@ source "proxmox-iso" "rocky-10" { scsi_controller = "virtio-scsi-single" disks { disk_size = "30G" - storage_pool = "templates" + storage_pool = "${var.proxmox_disk_storage}" type = "scsi" format = "qcow2" } @@ -37,7 +47,7 @@ source "proxmox-iso" "rocky-10" { model = "virtio" } - proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/" + proxmox_url = "https://${var.proxmox_host}:8006/api2/json/" insecure_skip_tls_verify = true username = "${var.proxmox_apiuser}" password = "${var.proxmox_apitoken}" diff --git a/Rocky/rocky-9.pkr.hcl b/Rocky/rocky-9.pkr.hcl index bc75c26..13e7758 100644 --- a/Rocky/rocky-9.pkr.hcl +++ b/Rocky/rocky-9.pkr.hcl @@ -1,3 +1,8 @@ +variable "proxmox_host" { + type = string + default = "proxmox.example.com" +} + variable "proxmox_apiuser" { type = string default = "packer" @@ -8,6 +13,11 @@ variable "proxmox_apitoken" { default = "changeme" } +variable "proxmox_disk_storage" { + type = string + default = "packer" +} + source "proxmox-iso" "rocky-9" { template_name = "rocky-9" template_description = "Rocky Linux 9.6, generated on ${timestamp()}" @@ -28,7 +38,7 @@ source "proxmox-iso" "rocky-9" { scsi_controller = "virtio-scsi-single" disks { disk_size = "30G" - storage_pool = "templates" + storage_pool = "${var.proxmox_disk_storage}" type = "scsi" format = "qcow2" } @@ -37,7 +47,7 @@ source "proxmox-iso" "rocky-9" { model = "virtio" } - proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/" + proxmox_url = "https://${var.proxmox_host}:8006/api2/json/" insecure_skip_tls_verify = true username = "${var.proxmox_apiuser}" password = "${var.proxmox_apitoken}" diff --git a/Ubuntu/ubuntu-22.pkr.hcl b/Ubuntu/ubuntu-22.pkr.hcl index 9988e1e..c1c5e58 100644 --- a/Ubuntu/ubuntu-22.pkr.hcl +++ b/Ubuntu/ubuntu-22.pkr.hcl @@ -1,3 +1,8 @@ +variable "proxmox_host" { + type = string + default = "proxmox.example.com" +} + variable "proxmox_apiuser" { type = string default = "packer" @@ -8,6 +13,11 @@ variable "proxmox_apitoken" { default = "changeme" } +variable "proxmox_disk_storage" { + type = string + default = "packer" +} + source "proxmox-iso" "ubuntu-22" { template_name = "ubuntu-22" template_description = "Ubuntu 22.04, generated on ${timestamp()}" @@ -39,7 +49,7 @@ source "proxmox-iso" "ubuntu-22" { scsi_controller = "virtio-scsi-single" disks { disk_size = "30G" - storage_pool = "templates" + storage_pool = "${var.proxmox_disk_storage}" type = "scsi" format = "qcow2" } @@ -48,7 +58,7 @@ source "proxmox-iso" "ubuntu-22" { model = "virtio" } - proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/" + proxmox_url = "https://${var.proxmox_host}:8006/api2/json/" insecure_skip_tls_verify = true username = "${var.proxmox_apiuser}" password = "${var.proxmox_apitoken}" diff --git a/Ubuntu/ubuntu-24.pkr.hcl b/Ubuntu/ubuntu-24.pkr.hcl index f424ac7..3130c16 100644 --- a/Ubuntu/ubuntu-24.pkr.hcl +++ b/Ubuntu/ubuntu-24.pkr.hcl @@ -1,3 +1,8 @@ +variable "proxmox_host" { + type = string + default = "proxmox.example.com" +} + variable "proxmox_apiuser" { type = string default = "packer" @@ -8,6 +13,11 @@ variable "proxmox_apitoken" { default = "changeme" } +variable "proxmox_disk_storage" { + type = string + default = "packer" +} + source "proxmox-iso" "ubuntu-24" { template_name = "ubuntu-24" template_description = "Ubuntu 24.04, generated on ${timestamp()}" @@ -39,7 +49,7 @@ source "proxmox-iso" "ubuntu-24" { scsi_controller = "virtio-scsi-single" disks { disk_size = "30G" - storage_pool = "templates" + storage_pool = "${var.proxmox_disk_storage}" type = "scsi" format = "qcow2" } @@ -48,7 +58,7 @@ source "proxmox-iso" "ubuntu-24" { model = "virtio" } - proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/" + proxmox_url = "https://${var.proxmox_host}:8006/api2/json/" insecure_skip_tls_verify = true username = "${var.proxmox_apiuser}" password = "${var.proxmox_apitoken}"