/
Vagrantfile_basebox
28 lines (24 loc) · 981 Bytes
/
Vagrantfile_basebox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Vagrantfile for setting up a new base box
## Aims to reduce redundant work, does as much as possible before creating masses of VMs
## Uses apt-deb-proxy to further reduce download times
## Jussi Isosomppi, 2018
$tscript = <<TSCRIPT
echo -e 'Acquire::http::proxy "http://172.28.230.7:8000";\nAcquire::https::proxy "http://172.28.230.7:8000";' \
> '/etc/apt/apt.conf.d/30proxy'
cat /etc/apt/apt.conf.d/30proxy
apt-get update
apt-get -y install salt-minion
sudo service salt-minion stop
sudo rm /etc/salt/minion
echo "master: 172.28.230.7" | sudo tee /etc/salt/minion
sudo service salt-minion start
cat /dev/null > ~/.bash_history && history -c
TSCRIPT
Vagrant.configure(2) do |config|
config.vm.box = "minimal/trusty64"
config.vm.provision "shell", inline: $tscript
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--usb", "on"]
vb.customize ["modifyvm", :id, "--usbehci", "off"]
end
end