diff --git a/rocky-9.0/data/init.ks.pkrtpl.hcl b/rocky-9/data/init.ks.pkrtpl.hcl similarity index 100% rename from rocky-9.0/data/init.ks.pkrtpl.hcl rename to rocky-9/data/init.ks.pkrtpl.hcl diff --git a/rocky-9.0/server.auto.pkrvars.hcl b/rocky-9/server.auto.pkrvars.hcl similarity index 82% rename from rocky-9.0/server.auto.pkrvars.hcl rename to rocky-9/server.auto.pkrvars.hcl index 4c4ad53..e876591 100644 --- a/rocky-9.0/server.auto.pkrvars.hcl +++ b/rocky-9/server.auto.pkrvars.hcl @@ -10,8 +10,8 @@ vm_qemu_agent = true proxmox_iso_pool = "local:iso" proxmox_iso_file = "Rocky-9.0-x86_64-minimal.iso" -template_description = "Rocky Linux 9.0 Template" -template_name = "rocky-90-cloud" +proxmox_template_description = "Rocky Linux 9.0 Template" +proxmox_template_name = "rocky-90-cloud" // Communicator Settings diff --git a/rocky-9.0/server.pkr.hcl b/rocky-9/server.pkr.hcl similarity index 91% rename from rocky-9.0/server.pkr.hcl rename to rocky-9/server.pkr.hcl index 07fd72c..f77ab76 100644 --- a/rocky-9.0/server.pkr.hcl +++ b/rocky-9/server.pkr.hcl @@ -26,8 +26,7 @@ source "proxmox-iso" "rocky-linux-90" { // Proxmox Settings proxmox_url = "${var.proxmox_url}" node = "${var.proxmox_node}" - username = "${var.proxmox_username}" - password = "${var.proxmox_password}" + token = "${var.proxmox_token}" // Virtual Machine Settings vm_id = "${var.vm_id}" @@ -76,9 +75,9 @@ source "proxmox-iso" "rocky-linux-90" { ssh_port = "${var.communicator_port}" ssh_timeout = "${var.communicator_timeout}" - template_description = "${var.template_description} on ${local.buildtime}" - template_name = "${var.template_name}" - unmount_iso = true + proxmox_template_description = "${var.proxmox_template_description} on ${local.buildtime}" + proxmox_template_name = "${var.proxmox_template_name}" + unmount_iso = true } build { diff --git a/rocky-9.0/variables.pkr.hcl b/rocky-9/variables.pkr.hcl similarity index 68% rename from rocky-9.0/variables.pkr.hcl rename to rocky-9/variables.pkr.hcl index 24c5699..2615aec 100644 --- a/rocky-9.0/variables.pkr.hcl +++ b/rocky-9/variables.pkr.hcl @@ -1,61 +1,63 @@ // Proxmox Settings variable "proxmox_iso_file" { - type = string + type = string + description = "Path to the ISO file to boot from, expressed as a proxmox datastore path." } variable "proxmox_iso_pool" { - type = string - default = "local:iso" + type = string + description = "Storage pool where the ISO file is stored." + default = "local:iso" } variable "proxmox_url" { - type = string - default = "" + type = string + description = "URL to the Proxmox API, including the full path." } variable "proxmox_node" { - type = string - default = "" + type = string + description = "Name of a node in the Proxmox cluster on which to start the virtual machine when it is created." } -variable "proxmox_username" { - type = string - default = "" -} - -variable "proxmox_password" { - type = string - default = "" +variable "proxmox_token" { + type = string + description = "Token for authenticating API calls." } variable "proxmox_storage_format" { - type = string - default = "raw" + type = string + description = "The format of the disk." + default = "raw" } variable "proxmox_storage_pool" { - type = string - default = "local-lvm" + type = string + description = "Name of the Proxmox storage pool where the virtual machine hard disk will be stored." + default = "local-lvm" } variable "proxmox_storage_pool_type" { - type = string - default = "lvm-thin" + type = string + description = "The type of the storage pool." + default = "lvm-thin" } -variable "template_description" { - type = string +variable "proxmox_template_description" { + type = string + description = "Description of the template, visible in the Proxmox interface." } -variable "template_name" { - type = string +variable "proxmox_template_name" { + type = string + description = "Description of the template, visible in the Proxmox interface." } // Virtual Machine Settings variable "vm_id" { type = number description = "The ID used to reference the virtual machine." - default = 0 + default = 900 } variable "vm_guest_os_language" { @@ -84,13 +86,13 @@ variable "vm_os_type" { variable "vm_cpu_sockets" { type = number - description = "The number of virtual CPUs sockets. (e.g. '2')" + description = "The number of virtual CPUs sockets." default = 1 } variable "vm_cpu_cores" { type = number - description = "The number of virtual CPUs cores per socket. (e.g. '1')" + description = "The number of virtual CPUs cores per socket." default = 1 } @@ -102,19 +104,19 @@ variable "vm_cpu_type" { variable "vm_mem_size" { type = number - description = "The size for the virtual memory in MB. (e.g. '2048')" + description = "The size for the virtual memory in MB." default = 1024 } variable "vm_disk_size" { type = string - description = "The size for the virtual disk in MB. (e.g. '8G')" + description = "The size for the virtual disk." default = "32G" } variable "vm_disk_controller_type" { type = list(string) - description = "The virtual disk controller types in sequence. (e.g. 'pvscsi')" + description = "The virtual disk controller types in sequence." default = ["pvscsi"] } @@ -126,7 +128,7 @@ variable "vm_disk_thin_provisioned" { variable "vm_network_adapter_model" { type = string - description = "Model of the virtual network adapter. (e.g. 'vmxnet3' or 'e1000e')" + description = "Model of the virtual network adapter." default = "e1000" } @@ -163,7 +165,7 @@ variable "vm_qemu_agent" { // Communicator Settings and Credentials variable "build_username" { type = string - description = "The username to login to the guest operating system. (e.g. rainpole)" + description = "The username to login to the guest operating system." sensitive = true }