-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathVagrantfile
executable file
·37 lines (31 loc) · 1.03 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
$script = <<-SCRIPT
# Change directory automatically on ssh login
if ! grep -qF "cd /vagrant" /home/vagrant/.bashrc ;
then echo "cd /vagrant" >> /home/vagrant/.bashrc ; fi
chown vagrant: /home/vagrant/.bashrc
SCRIPT
Vagrant.configure("2") do |config|
config.vm.provider :libvirt do |v|
v.cpus = "2"
v.memory = "2048"
end
config.vm.provider :virtualbox do |v|
v.name = "userli"
v.cpus = "2"
v.memory = "2048"
end
config.vm.box = "debian/bookworm64"
config.vm.hostname = "userli"
config.vm.network :private_network, ip: "192.168.60.99"
config.vm.synced_folder "./", "/vagrant",
type: "nfs",
nfs_udp: false,
linux__nfs_options: ['rw','no_subtree_check','all_squash','async']
config.ssh.forward_agent = true
config.vm.provision "ansible" do |ansible|
ansible.galaxy_role_file = "requirements.yml"
ansible.playbook = "ansible/playbook.yml"
ansible.compatibility_mode = "2.0"
end
config.vm.provision "shell", inline: $script
end