-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
39 lines (32 loc) · 1.06 KB
/
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
35
36
37
38
39
Vagrant.configure(2) do |config|
config.vm.box = "debian/stretch64"
config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder '.', '/vagrant', disabled: true
config.vm.provision "ansible" do |ansible|
ansible.playbook = "configure-wg.yml"
ansible.become = true
ansible.groups = {
"wireguard_gateway" => [ "gateway" ],
"wireguard_clients" => [ "c1", "c2" ]
}
ansible.host_vars = {
"gateway" => {
"wireguard_address" => "10.222.222.1/24",
# interface that traffic from clients will be routed to
"wireguard_forward_interface" => "eth0",
# interface that clients should use to connect to gateway
"wireguard_connect_interface" => "eth1",
# optional, just for testing below
"wireguard_port" => 5555
},
"c1" => { "wireguard_address" => "10.222.222.11/24" },
"c2" => { "wireguard_address" => "10.222.222.12/24" },
}
end
config.vm.define "gateway" do |vm|
end
config.vm.define "c1" do |vm|
end
config.vm.define "c2" do |vm|
end
end