packer/Debian-12/debian-12.pkr.hcl

64 lines
1.9 KiB
HCL

variable "proxmox_apiuser" {
type = string
default = "packer"
}
variable "proxmox_apitoken" {
type = string
default = "changeme"
}
source "proxmox-iso" "debian-12" {
template_name = "debian-12"
template_description = "Debian 12.5, generated on ${timestamp()}"
vm_id = "203"
boot_wait = "10s"
boot_key_interval = "200ms"
boot_command = ["<esc><wait1s>", "auto url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian.cfg", "<enter><wait>"]
http_directory = "http"
http_port_max = "8089"
http_port_min = "8080"
os = "l26"
cores = "2"
sockets = "1"
cpu_type = "host"
memory = "2048"
scsi_controller = "virtio-scsi-single"
disks {
disk_size = "30G"
storage_pool = "templates"
type = "scsi"
}
network_adapters {
bridge = "vmbr0"
model = "virtio"
}
proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/"
insecure_skip_tls_verify = true
username = "${var.proxmox_apiuser}"
password = "${var.proxmox_apitoken}"
node = "kamino"
pool = "Templates"
iso_url = "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso"
iso_checksum = "sha256:013f5b44670d81280b5b1bc02455842b250df2f0c6763398feb69af1a805a14f"
iso_storage_pool = "iso"
unmount_iso = true
iso_download_pve = true
ssh_username = "xadmin"
ssh_password = "packer"
ssh_timeout = "20m"
}
build {
sources = ["source.proxmox-iso.debian-12"]
provisioner "shell" {
script = "scripts/debian-install.sh"
}
}