forked from lae/ansible-role-proxmox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
30 lines (27 loc) · 838 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
29
30
Vagrant.configure("2") do |config|
config.vm.box = "debian/bullseye64"
config.vm.provider :libvirt do |libvirt|
libvirt.memory = 2560
libvirt.cpus = 2
libvirt.storage :file, :size => '128M'
libvirt.storage :file, :size => '128M'
end
N = 3
(1..N).each do |machine_id|
config.vm.define "pve-#{machine_id}" do |machine|
machine.vm.hostname = "pve-#{machine_id}"
if machine_id == N
machine.vm.provision :ansible do |ansible|
ansible.limit = "all,localhost"
ansible.playbook = "tests/vagrant/package_role.yml"
ansible.verbose = true
end
machine.vm.provision :ansible do |ansible|
ansible.limit = "all"
ansible.playbook = "tests/vagrant/provision.yml"
ansible.verbose = true
end
end
end
end
end