-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
34 lines (28 loc) · 952 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
31
32
33
34
# -*- mode: ruby -*-
# vi: set ft=ruby :
VIMAGE = "almalinux/8"
#VIMAGE = "centos/7"
#VIMAGE = "debian/bullseye64"
#VIMAGE = "opensuse/Leap-15.4.x86_64"
#VIMAGE = "generic/ubuntu2204"
NODES = 1
Vagrant.configure(2) do |config|
(1..NODES).each do |machine_id|
config.vm.define "cobbler-server#{machine_id}" do |machine|
machine.vm.box = VIMAGE
machine.vm.hostname = "cobbler-server#{machine_id}.localdomain.example.net"
machine.vm.network :private_network, ip: "192.168.56.#{55+machine_id}"
config.ssh.insert_key = false
#Run provisioning on all machines AFTERWARDS
if machine_id == NODES
machine.vm.provision :ansible do |ansible|
ansible.verbose = "v"
ansible.playbook = "cobbler_deploy.yml"
ansible.limit = "cobbler3x_server"
ansible.inventory_path = "hosts.ini"
#ansible.extra_vars = { deploy_some_var: true }
end
end
end
end
end