[ubuntu24] feat: restructured packer file and added comments
This commit is contained in:
parent
b373afbd3a
commit
8fa92611c4
@ -1,12 +1,15 @@
|
||||
# packer
|
||||
packer {
|
||||
required_plugins {
|
||||
proxmox = {
|
||||
version = ">=1.1.7"
|
||||
version = ">=1.1.8"
|
||||
source = "github.com/hashicorp/proxmox"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# variables
|
||||
variable "proxmox_iso_pool" {
|
||||
type = string
|
||||
default = ""
|
||||
@ -77,23 +80,35 @@ variable "version" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
|
||||
# builder
|
||||
source "proxmox-iso" "template" {
|
||||
|
||||
# boot
|
||||
boot_command = ["c", "linux /casper/vmlinuz -- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/'", "<enter><wait><wait>", "initrd /casper/initrd", "<enter><wait><wait>", "boot<enter>"]
|
||||
boot_wait = "10s"
|
||||
|
||||
# specs
|
||||
cores = "2"
|
||||
memory = "2048"
|
||||
|
||||
# storage
|
||||
disks {
|
||||
disk_size = "20G"
|
||||
format = "${var.proxmox_storage_format}"
|
||||
storage_pool = "${var.proxmox_storage_pool}"
|
||||
type = "virtio"
|
||||
}
|
||||
http_directory = "ubuntu24/http"
|
||||
insecure_skip_tls_verify = true
|
||||
iso_file = "${var.proxmox_iso_pool}/${var.ubuntu_image}"
|
||||
memory = "2048"
|
||||
|
||||
# networking
|
||||
network_adapters {
|
||||
bridge = "vmbr0"
|
||||
}
|
||||
|
||||
# misc
|
||||
http_directory = "ubuntu24/http"
|
||||
insecure_skip_tls_verify = true
|
||||
iso_file = "${var.proxmox_iso_pool}/${var.ubuntu_image}"
|
||||
node = "${var.proxmox_node}"
|
||||
vm_id = "999"
|
||||
tags = "mgmt"
|
||||
|
Loading…
Reference in New Issue
Block a user