generated from TIBHannover/application-setup-box-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
28 lines (26 loc) · 831 Bytes
/
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
require 'yaml'
settings = YAML.load_file 'inventory_vagrant.yml'
Vagrant.configure("2") do |config|
config.vm.define "test-vm" do |srv|
srv.vm.box = "debian/bullseye64"
srv.ssh.insert_key = false
srv.vm.hostname = "test.box"
srv.vm.network :private_network, ip: settings['all']['vars']['box_ip']
srv.vm.provider :virtualbox do |vb|
vb.name = "test_box"
vb.memory = 4096
vb.cpus = 2
end
end
config.vm.provision "ansible_local" do |ansible|
ansible.install = true
ansible.version = "latest"
ansible.compatibility_mode = "2.0"
ansible.playbook = "ansible/playbook.yml"
ansible.galaxy_role_file = "ansible/requirements.yml"
ansible.verbose = true
ansible.groups = {
"all" => ["test-vm"]
}
end
end