Added packer Debian 12 build
This commit is contained in:
84
packer/linux/debian-12-x64/debian-12-x64.pkr.hcl
Normal file
84
packer/linux/debian-12-x64/debian-12-x64.pkr.hcl
Normal file
@ -0,0 +1,84 @@
|
||||
packer {
|
||||
required_version = ">= 1.11.0"
|
||||
required_plugins {
|
||||
vsphere = {
|
||||
source = "github.com/hashicorp/vsphere"
|
||||
version = ">= 1.4.0"
|
||||
}
|
||||
ansible = {
|
||||
source = "github.com/hashicorp/ansible"
|
||||
version = ">= 1.1.1"
|
||||
}
|
||||
git = {
|
||||
source = "github.com/ethanmdavidson/git"
|
||||
version = ">= 0.6.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// BLOCK: locals
|
||||
// Defines the local variables.
|
||||
//locals {
|
||||
// bbbbb = "aaaa"
|
||||
//}
|
||||
|
||||
source "vsphere-iso" "debian-12" {
|
||||
vcenter_server = var.vcenter_server
|
||||
username = var.vcenter_username
|
||||
password = var.vcenter_password
|
||||
insecure_connection = true
|
||||
datacenter = var.vcenter_datacenter
|
||||
cluster = var.vcenter_cluster
|
||||
host = var.vcenter_host
|
||||
datastore = var.vcenter_datastore
|
||||
folder = var.vcenter_folder
|
||||
# convert_to_template = true
|
||||
// ****************
|
||||
vm_name = var.vm_name
|
||||
CPUs = var.vm_num_cpu
|
||||
RAM = var.vm_ram
|
||||
vm_version = var.vm_hardware_version
|
||||
guest_os_type = var.vm_guest_os_type
|
||||
disk_controller_type = ["pvscsi"]
|
||||
storage {
|
||||
disk_size = var.vm_disk_size
|
||||
disk_thin_provisioned = true
|
||||
}
|
||||
network_adapters {
|
||||
network = var.vm_network
|
||||
network_card = var.vm_network_nic_type
|
||||
}
|
||||
// ****************
|
||||
ip_wait_timeout = "45m"
|
||||
ssh_username = var.connection_username
|
||||
ssh_password = var.connection_password
|
||||
ssh_timeout = "12h"
|
||||
ssh_port = "22"
|
||||
ssh_handshake_attempts = "20"
|
||||
shutdown_timeout = "15m"
|
||||
// ****************
|
||||
iso_checksum = var.iso_checksum
|
||||
// iso_url = var.os_iso_url
|
||||
iso_paths = [var.os_iso_paths]
|
||||
// ****************
|
||||
|
||||
boot_wait = "5s"
|
||||
boot_command = [
|
||||
"<esc><wait>",
|
||||
"<esc><wait>",
|
||||
"/install.amd/vmlinuz <wait>",
|
||||
"ipv6.disable=1 <wait>",
|
||||
"auto=true <wait>",
|
||||
"netcfg/dhcp_timeout=30 <wait>",
|
||||
"priority=critical locale=en_US <wait>",
|
||||
"preseed/url=http://aassdd.ru/.my-preseed/debian/preseed.cfg <wait>",
|
||||
"--- <wait>",
|
||||
"initrd=/install.amd/initrd.gz<wait><enter>"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
build {
|
||||
name = "template"
|
||||
sources = ["source.vsphere-iso.debian-12"]
|
||||
}
|
Reference in New Issue
Block a user