2023-03-01 15:01:55 +01:00
# coding: utf-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
unless Vagrant . has_plugin? ( " vagrant-disksize " )
raise Vagrant :: Errors :: VagrantError . new , " vagrant-disksize plugin is missing. Please install it using 'vagrant plugin install vagrant-disksize' and rerun 'vagrant up' "
end
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant . configure ( " 2 " ) do | config |
2023-04-17 14:10:57 +02:00
required_plugins = %w( vagrant-disksize )
2023-03-01 15:01:55 +01:00
_retry = false
required_plugins . each do | plugin |
unless Vagrant . has_plugin? plugin
system " vagrant plugin install #{ plugin } "
_retry = true
end
end
if ( _retry )
exec " vagrant " + ARGV . join ( ' ' )
end
config . vm . box = " debian/bullseye64 "
config . vm . hostname = 'kaz-vm'
2023-05-17 11:29:27 +02:00
config . disksize . size = '50GB'
2023-03-01 15:01:55 +01:00
config . vm . provider " virtualbox " do | vb |
vb . memory = " 4096 "
vb . cpus = " 2 "
vb . name = " kaz-vm "
vb . customize [ " modifyvm " , :id , " --vram " , " 64 " , " --clipboard-mode " , " bidirectional " , '--graphicscontroller' , 'vmsvga' , '--natnet1' , '192.168.64.0/24' ]
vb . gui = true
end
#permet d'avoir un répertoire partagé entre la VM et le host
config . vm . synced_folder " /tmp/ " , " /tmp_host "
config . vm . synced_folder " files/ " , " /root/kaz-vagrant "
config . vm . provision " shell " do | s |
s . inline = " /vagrant/files/vm-provision.sh "
s . env = { " KAZGUARD " = > " true " , " HOSTLANG " = > ENV [ 'LANG' ] , " NOKAZ " = > ENV [ 'NOKAZ' ] , " KAZBRANCH " = > ENV [ 'KAZBRANCH' ] }
end
end