From 2c57dbcddc1b687f3376941297e7c7c18ae50910 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Wed, 22 Jun 2022 11:40:25 +0200 Subject: [PATCH] Fix boot kernel command;Rename files&folders --- .drone.yml | 10 +++++----- README.md | 2 +- .../meta-data | 0 .../user-data | 0 ...rver20.04.pkr.hcl => ubuntuserver22.04.pkr.hcl} | 14 +++++++------- 5 files changed, 13 insertions(+), 13 deletions(-) rename packer/preseed/{UbuntuServer20.04 => UbuntuServer22.04}/meta-data (100%) rename packer/preseed/{UbuntuServer20.04 => UbuntuServer22.04}/user-data (100%) rename packer/{ubuntuserver20.04.pkr.hcl => ubuntuserver22.04.pkr.hcl} (91%) diff --git a/.drone.yml b/.drone.yml index 9335728..20cc787 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,17 +18,17 @@ steps: - packer --version - ansible --version - ovftool --version -- name: Ubuntu Server 20.04 +- name: Ubuntu Server 22.04 image: bv11-cr01.bessems.eu/library/packer-extended pull: always commands: - | sed -i -e "s/<>/$${SSH_PASSWORD}/g" \ - packer/preseed/UbuntuServer20.04/user-data + packer/preseed/UbuntuServer22.04/user-data - | yamllint -d "{extends: relaxed, rules: {line-length: disable}}" \ ansible \ - packer/preseed/UbuntuServer20.04/user-data \ + packer/preseed/UbuntuServer22.04/user-data \ scripts - | packer init -upgrade \ @@ -36,7 +36,7 @@ steps: - | packer validate \ -var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \ - -var vm_guestos=ubuntuserver20.04 \ + -var vm_guestos=ubuntuserver22.04 \ -var repo_username=$${REPO_USERNAME} \ -var repo_password=$${REPO_PASSWORD} \ -var vsphere_password=$${VSPHERE_PASSWORD} \ @@ -46,7 +46,7 @@ steps: packer build \ -on-error=cleanup -timestamp-ui \ -var vm_name=$DRONE_BUILD_NUMBER-${DRONE_COMMIT_SHA:0:10} \ - -var vm_guestos=ubuntuserver20.04 \ + -var vm_guestos=ubuntuserver22.04 \ -var repo_username=$${REPO_USERNAME} \ -var repo_password=$${REPO_PASSWORD} \ -var vsphere_password=$${VSPHERE_PASSWORD} \ diff --git a/README.md b/README.md index 985693b..5f79c84 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# Packer.Images [![Build Status](https://ci.spamasaurus.com/api/badges/djpbessems/Packer.Images/status.svg?ref=refs/heads/Windows10)](https://ci.spamasaurus.com/djpbessems/Packer.Images) +# Packer.Images [![Build Status](https://ci.spamasaurus.com/api/badges/djpbessems/Packer.Images/status.svg?ref=refs/heads/UbuntuServer22.04)](https://ci.spamasaurus.com/djpbessems/Packer.Images) diff --git a/packer/preseed/UbuntuServer20.04/meta-data b/packer/preseed/UbuntuServer22.04/meta-data similarity index 100% rename from packer/preseed/UbuntuServer20.04/meta-data rename to packer/preseed/UbuntuServer22.04/meta-data diff --git a/packer/preseed/UbuntuServer20.04/user-data b/packer/preseed/UbuntuServer22.04/user-data similarity index 100% rename from packer/preseed/UbuntuServer20.04/user-data rename to packer/preseed/UbuntuServer22.04/user-data diff --git a/packer/ubuntuserver20.04.pkr.hcl b/packer/ubuntuserver22.04.pkr.hcl similarity index 91% rename from packer/ubuntuserver20.04.pkr.hcl rename to packer/ubuntuserver22.04.pkr.hcl index e3a19eb..44a6401 100644 --- a/packer/ubuntuserver20.04.pkr.hcl +++ b/packer/ubuntuserver22.04.pkr.hcl @@ -20,9 +20,9 @@ source "vsphere-iso" "ubuntuserver" { boot_order = "disk,cdrom" boot_command = [ - "", - " autoinstall ds=nocloud;", - "" + "e", + " autoinstall ds=nocloud;", + "" ] boot_wait = "2s" @@ -48,8 +48,8 @@ source "vsphere-iso" "ubuntuserver" { usb_controller = ["xhci"] cd_files = [ - "packer/preseed/UbuntuServer20.04/user-data", - "packer/preseed/UbuntuServer20.04/meta-data" + "packer/preseed/UbuntuServer22.04/user-data", + "packer/preseed/UbuntuServer22.04/meta-data" ] cd_label = "cidata" iso_url = local.iso_authenticatedurl @@ -94,7 +94,7 @@ build { " -ManifestFileName '/scratch/ubuntuserver/${var.vm_guestos}-${var.vm_name}.mf'", "ovftool --acceptAllEulas --allowExtraConfig --overwrite \\", " '/scratch/ubuntuserver/${var.vm_guestos}-${var.vm_name}.ovf' \\", - " /output/Ubuntu-Server-20.04.ova" + " /output/Ubuntu-Server-22.04.ova" ] } -} \ No newline at end of file +}