Initial build based on 22.04
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-06-24 23:44:10 +02:00
parent 2c57dbcddc
commit 2bd0f8df0a
9 changed files with 56 additions and 12 deletions

View File

@ -3,7 +3,7 @@ packer {
}
}
source "vsphere-iso" "ubuntuserver" {
source "vsphere-iso" "k8sbootstrap" {
vcenter_server = var.vcenter_server
username = var.vsphere_username
password = var.vsphere_password
@ -67,11 +67,11 @@ source "vsphere-iso" "ubuntuserver" {
build {
sources = [
"source.vsphere-iso.ubuntuserver"
"source.vsphere-iso.k8sbootstrap"
]
provisioner "ansible" {
only = ["vsphere-iso.ubuntuserver"]
only = ["vsphere-iso.k8sbootstrap"]
playbook_file = "ansible/playbook.yml"
user = "ubuntu"
@ -85,16 +85,16 @@ build {
}
post-processor "shell-local" {
only = ["vsphere-iso.ubuntuserver"]
only = ["vsphere-iso.k8sbootstrap"]
inline = [
"pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\",
" -OVFFile '/scratch/ubuntuserver/${var.vm_guestos}-${var.vm_name}.ovf' \\",
" -OVFFile '/scratch/k8sbootstrap/${var.vm_guestos}-${var.vm_name}.ovf' \\",
" -Parameter @{'appliance.name'='${var.vm_guestos}';'appliance.version'='${var.vm_name}'}\"",
"pwsh -file scripts/Update-Manifest.ps1 \\",
" -ManifestFileName '/scratch/ubuntuserver/${var.vm_guestos}-${var.vm_name}.mf'",
" -ManifestFileName '/scratch/k8sbootstrap/${var.vm_guestos}-${var.vm_name}.mf'",
"ovftool --acceptAllEulas --allowExtraConfig --overwrite \\",
" '/scratch/ubuntuserver/${var.vm_guestos}-${var.vm_name}.ovf' \\",
" /output/Ubuntu-Server-22.04.ova"
" '/scratch/k8sbootstrap/${var.vm_guestos}-${var.vm_name}.ovf' \\",
" /output/Kubernetes.Bootstrap.Appliance.ova"
]
}
}