-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
72 lines (58 loc) · 2.07 KB
/
Vagrantfile
File metadata and controls
72 lines (58 loc) · 2.07 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# -*- mode:ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">=1.6.2"
NODE_A_IP = "192.168.57.2"
NODE_A_HOST = "win11-dev"
NODE_B_IP = "192.168.57.3"
NODE_B_HOST = "win11-target"
Vagrant.configure("2") do |config|
config.vm.define NODE_A_HOST do |v|
v.vm.box = "StefanScherer/windows_11"
v.vm.guest = :windows
v.vm.communicator = "winrm"
v.winrm.retry_limit = 30
v.winrm.retry_delay = 10
v.vm.box_version = "2021.12.09"
v.vm.synced_folder "src/", "C:/src/"
v.vm.hostname = NODE_A_HOST
v.vm.network "private_network", ip: NODE_A_IP
v.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true
v.vm.provision "shell", path: "scripts/ConfigureRemotingForAnsible.ps1"
end
config.vm.define NODE_B_HOST do |v|
v.vm.box = "StefanScherer/windows_11"
v.vm.guest = :windows
v.vm.communicator = "winrm"
v.winrm.retry_limit = 30
v.winrm.retry_delay = 10
v.vm.box_version = "2021.12.09"
v.vm.synced_folder "src/", "C:/src/"
v.vm.hostname = NODE_B_HOST
v.vm.network "private_network", ip: NODE_B_IP
v.vm.network :forwarded_port, guest: 5985, host: 5986, id: "winrm", auto_correct: true
v.vm.provision "shell", path: "scripts/ConfigureRemotingForAnsible.ps1"
end
config.vm.provider "virtualbox" do |vb, override|
vb.customize ["modifyvm", :id, "--memory", 4096]
vb.customize ["modifyvm", :id, "--cpus", 6]
vb.customize ["modifyvm", :id, "--vram", 256]
end
# runs against both VMs
config.vm.provision :ansible do |ansible|
ansible.verbose = "v"
ansible.playbook = "ansible/main.yml"
ansible.groups = {
"DEV" => [NODE_A_HOST],
"TARGET" => [NODE_B_HOST],
# "win10-target" => [NODE_C_HOST],
}
ansible.host_vars = {
NODE_A_HOST => { "NODE_IP" => NODE_A_IP },
NODE_B_HOST => { "NODE_IP" => NODE_B_IP },
# NODE_C_HOST => { "NODE_IP" => NODE_C_IP },
}
ansible.verbose = "v"
ansible.inventory_path = "inventory.ini"
ansible.limit = "all"
end
end