util: Create HOSTNAME variable

Change-Id: Ia68f1bef2bb9e4e5e18476b6100be80f8cf1c799
This commit is contained in:
Bobby R. Bruce
2023-10-04 17:42:21 -07:00
parent 529423f47a
commit c0cb16ba89
2 changed files with 4 additions and 4 deletions

View File

@@ -3,12 +3,13 @@
PERSONAL_ACCESS_TOKEN="<PERSONAL ACCESS TOKEN>"
GITHUB_ORG="<GITHUB_ORG>"
HOSTNAME="<VM NAME>"
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu2204"
config.vm.box_check_update = true
config.vm.define "<VM NAME>"
config.vm.hostname = "<VM NAME>"
config.vm.define "#{HOSTNAME}"
config.vm.hostname = "#{HOSTNAME}"
config.ssh.username = "vagrant"
config.ssh.password = "vagrant"

View File

@@ -17,8 +17,7 @@ fi
for (( i=1; i<=NUM_RUNNERS; i++ )); do
sed -i "s/ config.vm.define.*/ config.vm.define \"${RUNNER_PREFIX}-${i}\"/g" Vagrantfile
sed -i "s/ config.vm.hostname.*/ config.vm.hostname = \"${RUNNER_PREFIX}-${i}\"/g" Vagrantfile
sed -i "s/HOSTNAME=.*/HOTNAME=\"${RUNNER_PREFIX}-${i}\"/g" Vagrantfile
if [[ "${param}" == "destroy" ]]; then
VAGRANT_VAGRANTFILE=Vagrantfile vagrant destroy -f
elif [[ "${param}" == "shutdown" ]]; then