-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile_single
32 lines (27 loc) · 969 Bytes
/
Vagrantfile_single
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
#VIMAGE = "almalinux/8"
#VIMAGE = "centos/7"
#VIMAGE = "debian/bullseye64"
VIMAGE = "generic/ubuntu2204"
NODES = 1
Vagrant.configure(2) do |config|
(1..NODES).each do |machine_id|
config.vm.define "amanda-server#{machine_id}" do |machine|
machine.vm.box = VIMAGE
machine.vm.hostname = "amanda-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 = "amanda_master_playbook.yml"
ansible.limit = "amanda_server,amanda_client"
ansible.inventory_path = "hosts.ini"
ansible.extra_vars = { vagrant_hostname: "true", deploy_test_vtape_cfg: "true" }
end
end
end
end
end