Remove baremetal logic
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2f902fa27c
commit
bd82e13fc4
@ -64,72 +64,10 @@ source "vsphere-iso" "ubuntuserver" {
|
|||||||
}
|
}
|
||||||
remove_cdrom = true
|
remove_cdrom = true
|
||||||
}
|
}
|
||||||
source "vsphere-iso" "ubuntuserver-baremetal" {
|
|
||||||
vcenter_server = var.vcenter_server
|
|
||||||
username = var.vsphere_username
|
|
||||||
password = var.vsphere_password
|
|
||||||
insecure_connection = "true"
|
|
||||||
|
|
||||||
vm_name = "${var.vm_guestos}-${var.vm_name}-baremetal"
|
|
||||||
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 = [
|
|
||||||
"<enter><wait2><enter><wait><f6><esc><wait>",
|
|
||||||
" autoinstall<wait2> ds=nocloud;",
|
|
||||||
"<wait><enter>"
|
|
||||||
]
|
|
||||||
boot_wait = "2s"
|
|
||||||
|
|
||||||
communicator = "ssh"
|
|
||||||
ssh_username = "ubuntu"
|
|
||||||
ssh_password = var.ssh_password
|
|
||||||
ssh_timeout = "20m"
|
|
||||||
ssh_handshake_attempts = "100"
|
|
||||||
ssh_pty = true
|
|
||||||
|
|
||||||
CPUs = 2
|
|
||||||
RAM = 4096
|
|
||||||
|
|
||||||
network_adapters {
|
|
||||||
network = var.vsphere_network
|
|
||||||
network_card = "vmxnet3"
|
|
||||||
}
|
|
||||||
storage {
|
|
||||||
disk_size = 20480
|
|
||||||
disk_thin_provisioned = true
|
|
||||||
}
|
|
||||||
disk_controller_type = ["pvscsi"]
|
|
||||||
usb_controller = ["xhci"]
|
|
||||||
|
|
||||||
cd_files = [
|
|
||||||
"packer/preseed/UbuntuServer20.04/user-data",
|
|
||||||
"packer/preseed/UbuntuServer20.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"
|
|
||||||
|
|
||||||
export {
|
|
||||||
images = false
|
|
||||||
output_directory = "/scratch/ubuntuserver-baremetal"
|
|
||||||
}
|
|
||||||
remove_cdrom = true
|
|
||||||
}
|
|
||||||
|
|
||||||
build {
|
build {
|
||||||
sources = [
|
sources = [
|
||||||
"source.vsphere-iso.ubuntuserver",
|
"source.vsphere-iso.ubuntuserver"
|
||||||
"source.vsphere-iso.ubuntuserver-baremetal"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
provisioner "ansible" {
|
provisioner "ansible" {
|
||||||
@ -159,15 +97,4 @@ build {
|
|||||||
" /output/Ubuntu-Server-20.04.ova"
|
" /output/Ubuntu-Server-20.04.ova"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
post-processor "shell-local" {
|
|
||||||
only = ["vsphere-iso.ubuntuserver-baremetal"]
|
|
||||||
inline = [
|
|
||||||
"qemu-img convert -f vmdk -O raw \\",
|
|
||||||
" /scratch/ubuntuserver-baremetal/${var.vm_guestos}-${var.vm_name}-baremetal-disk-0.vmdk \\",
|
|
||||||
" /scratch/ubuntuserver-baremetal/${var.vm_guestos}-${var.vm_name}.raw",
|
|
||||||
"gzip -c \\",
|
|
||||||
" /scratch/ubuntuserver-baremetal/${var.vm_guestos}-${var.vm_name}.raw \\",
|
|
||||||
" > /output/Ubuntu-Server-20.04.raw.gz"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user