From 1b4c4b5d64e8656207aea3e6afe7c8cc14cd9a55 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Thu, 6 Jun 2024 16:54:05 +1000 Subject: [PATCH] build: Cleanup workflow action steps --- .gitea/workflows/actions.yaml | 13 +++++-------- packer/source.pkr.hcl | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/actions.yaml b/.gitea/workflows/actions.yaml index c427fb8..b9648ae 100644 --- a/.gitea/workflows/actions.yaml +++ b/.gitea/workflows/actions.yaml @@ -72,20 +72,17 @@ jobs: id: setup with: version: "latest" - - name: Run `packer init` + - name: Prepare build environment id: init - run: packer init -upgrade ./packer - - name: Prepare dependencies and inject configuration run: | - export BUILD_COMMIT=$(echo "${{ gitea.sha }}" | cut -c 1-10) - export BUILD_SUFFIX=$(openssl rand -hex 3) - - sed -i -e "s/<>/${{ secrets.SSH_PASSWORD }}/g" \ - packer/preseed/UbuntuServer22.04/user-data + packer init -upgrade ./packer ansible-galaxy collection install \ -r ansible/requirements.yml \ -p ./ansible/collections + + echo "BUILD_COMMIT=$(echo ${{ gitea.sha }} | cut -c 1-10)" >> $GITHUB_ENV + echo "BUILD_SUFFIX=$(openssl rand -hex 3)" >> $GITHUB_ENV - name: Run `packer validate` id: validate run: | diff --git a/packer/source.pkr.hcl b/packer/source.pkr.hcl index 8acec86..f7efa8a 100644 --- a/packer/source.pkr.hcl +++ b/packer/source.pkr.hcl @@ -15,7 +15,7 @@ source "vsphere-iso" "ubuntu" { boot_order = "disk,cdrom" boot_command = [ "e", - " autoinstall ds=nocloud;", + " autoinstall network-config=disabled ds=nocloud;", "" ] boot_wait = "2s"