Packer.Images/packer/sources.pkr.hcl
Danny Bessems d915c21e44
Some checks failed
continuous-integration/drone/push Build is failing
Upgrade base image;Unpin ansible-core;Attempt different packer syntax
2023-01-19 15:24:23 +01:00

62 lines
1.7 KiB
HCL

source "vsphere-iso" "ubuntu" {
vcenter_server = var.vcenter_server
username = var.vsphere_username
password = var.vsphere_password
insecure_connection = "true"
datacenter = var.vsphere_datacenter
cluster = var.vsphere_cluster
host = var.vsphere_host
folder = var.vsphere_folder
datastore = var.vsphere_datastore
guest_os_type = "ubuntu64Guest"
boot_order = "disk,cdrom"
boot_command = [
"e<down><down><down><end>",
" autoinstall ds=nocloud;",
"<F10>"
]
boot_wait = "2s"
communicator = "ssh"
ssh_username = "ubuntu"
ssh_password = var.ssh_password
ssh_timeout = "20m"
ssh_handshake_attempts = "100"
ssh_pty = true
CPUs = 4
RAM = 8192
network_adapters {
network = var.vsphere_network
network_card = "vmxnet3"
}
storage {
disk_size = 76800
disk_thin_provisioned = true
}
disk_controller_type = ["pvscsi"]
usb_controller = ["xhci"]
cd_files = [
"packer/preseed/UbuntuServer22.04/user-data",
"packer/preseed/UbuntuServer22.04/meta-data"
]
cd_label = "cidata"
iso_url = local.iso_authenticatedurl
iso_checksum = var.iso_checksum
shutdown_command = "echo '${var.ssh_password}' | sudo -S shutdown -P now"
shutdown_timeout = "5m"
remove_cdrom = true
export {
images = false
output_directory = "/scratch/airgapped-k8s"
}
}