Skip to content

Commit

Permalink
pbTests: Add Ubuntu 22.04 Vagrantfile
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart X Addison <[email protected]>
  • Loading branch information
sxa committed Feb 23, 2023
1 parent 3c54713 commit 4c502a4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ansible/pbTestScripts/vmDestroy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ checkOS() {
osToDestroy="U20";;
"Ubuntu2104" | "U21" | "u21" )
osToDestroy="U21";;
"Ubuntu2204" | "U22" | "u22" )
osToDestroy="U22";;
"CentOS6" | "centos6" | "C6" | "c6" )
osToDestroy="C6" ;;
"CentOS7" | "centos7" | "C7" | "c7" )
Expand All @@ -64,7 +66,7 @@ checkOS() {
"Windows2012" | "Win2012" | "W12" | "w12" )
osToDestroy="W2012";;
"all" )
osToDestroy="U16 U18 U20 U21 C6 C7 C8 D8 D10 FBSD12 Sol10 W2012" ;;
osToDestroy="U16 U18 U20 U21 U22 C6 C7 C8 D8 D10 FBSD12 Sol10 W2012" ;;
"")
echo "No OS detected. Did you miss the '-o' option?" ; usage; exit 1;;
*) echo "$OS is not a currently supported OS" ; listOS; exit 1;
Expand All @@ -78,6 +80,7 @@ listOS() {
- Ubuntu1804
- Ubuntu2004
- Ubuntu2104
- Ubuntu2204
- CentOS6
- CentOS7
- CentOS8
Expand Down
26 changes: 26 additions & 0 deletions ansible/vagrant/Vagrantfile.Ubuntu2204
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

$script = <<SCRIPT
# Put the host machine's IP into the authorised_keys file on the VM
if [ -r /vagrant/id_rsa.pub ]; then
mkdir -p $HOME/.ssh && cat /vagrant/id_rsa.pub >> $HOME/.ssh/authorized_keys
fi
SCRIPT

# 2 = version of configuration file for Vagrant 1.1+ leading up to 2.0.x
Vagrant.configure("2") do |config|

config.vm.define :adoptopenjdkU22 do |adoptopenjdkU22|
adoptopenjdkU22.vm.box = "generic/ubuntu2204"
adoptopenjdkU22.vm.synced_folder ".", "/vagrant"
adoptopenjdkU22.vm.hostname = "adoptopenjdkU22"
adoptopenjdkU22.vm.network :private_network, type: "dhcp"
adoptopenjdkU22.vm.provision "shell", inline: $script, privileged: false
end
config.vm.provider "virtualbox" do |v|
v.gui = false
v.memory = 2560
v.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
end
end

0 comments on commit 4c502a4

Please sign in to comment.