This commit is contained in:
Eliezer Croitoru 2023-06-06 15:22:19 +03:00
parent 4b872eb207
commit 5a7073b650
7 changed files with 29 additions and 14 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.vagrant/

36
Vagrantfile vendored
View File

@ -1,6 +1,19 @@
$ENALBE_SYNC_FOLDER = false $ENALBE_SYNC_FOLDER = false
$HOST_NET = "204-net"
$ENALBE_SYNC_FOLDER = true if File.exist?("sync_shared")
$HOST_NET = File.readlines('net').first.chomp
$VM_NAME = File.readlines('vmname').first.chomp
$VM_MEM = File.readlines('vmmem').first.chomp.to_i
$VM_VCPU = File.readlines('vmcpu').first.chomp.to_i
$BOX = File.readlines('box').first.chomp
# Will not work on Hyper-V
#$VM_DISK_SIZE = File.readlines('disksize').first.chomp
$PROVISION_SSH_KEY_SCRIPT=<<EOF $PROVISION_SSH_KEY_SCRIPT=<<EOF
mkdir -p /root/.ssh mkdir -p /root/.ssh
@ -17,24 +30,19 @@ EOF
Vagrant.configure("2") do |config| Vagrant.configure("2") do |config|
config.vm.box = "almalinux/8" config.vm.box = $BOX
# config.ssh.forward_agent = false ## Remember to generate the vagrant private key.
# config.ssh.insert_key = true ## ssh-keygen -f C:\Users\eliezer\.ssh\vagrant
config.ssh.insert_key = false config.ssh.insert_key = false
# config.ssh.username = "vagrant"
# config.ssh.password = "vagrant"
# config.ssh.private_key_path = "~/.vagrant.d/insecure_private_key"
# config.ssh.private_key_path = "~/.ssh/id_rsa"
# config.ssh.private_key_path = ['~/.ssh/vagrant' ]
config.ssh.private_key_path = ['~/.ssh/vagrant', '~/.vagrant.d/insecure_private_key' ] config.ssh.private_key_path = ['~/.ssh/vagrant', '~/.vagrant.d/insecure_private_key' ]
config.vm.provider "hyperv" do |hv, override| config.vm.provider "hyperv" do |hv, override|
hv.vmname = "almalinux8" hv.vmname = $VM_NAME
hv.memory = 2048 hv.maxmemory = $VM_MEM
hv.cpus = 6 hv.memory = $VM_MEM
hv.cpus = $VM_VCPU
override.vm.allowed_synced_folder_types = [:rsync] override.vm.allowed_synced_folder_types = [:rsync]
end end

1
box Normal file
View File

@ -0,0 +1 @@
almalinux/8

1
net Normal file
View File

@ -0,0 +1 @@
172-20-20-net

1
vmcpu Normal file
View File

@ -0,0 +1 @@
2

1
vmmem Normal file
View File

@ -0,0 +1 @@
2048

2
vmname Normal file
View File

@ -0,0 +1,2 @@
085-almalinux8