-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
51 lines (41 loc) · 1.2 KB
/
Vagrantfile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- mode: ruby -*-
# vi: set ft=ruby :
$provisionning = <<-PROVISIONNING
# Installing Docker
sudo curl -fsSL get.docker.com | bash
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -a -G docker vagrant
# Installing tools and molecule
sudo apt-get update -qq
sudo apt-get install -y -q curl git tree vim tox
sudo updatedb
echo
echo "All set. To run molecule test while editing on your workstation, you can"
echo " "
echo " vagrant ssh"
echo " cd /vagrant"
echo " tox
echo " "
PROVISIONNING
Vagrant.configure(2) do |config|
config.vm.box = "debian/buster64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
vb.cpus = "2"
end
config.vm.provider "libvirt" do |libvirt|
libvirt.memory = "2048"
libvirt.cpus = "2"
end
config.vm.hostname = File.basename(Dir.getwd)+'.vagrant'
if Vagrant.has_plugin?("vagrant-hostmanager")
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.manage_guest = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
end
config.vm.synced_folder ".", "/vagrant", type: "nfs"
config.vm.provision "shell", inline: $provisionning
end