Compatibility with vagrant 2.2.17 and up

This commit is contained in:
Jeroen De Meerleer 2021-07-20 15:12:24 +02:00
parent f8a1f62d29
commit bd6ea4c54d
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6

7
Vagrantfile vendored
View File

@ -111,7 +111,10 @@ def forwarded_ports(vm, host)
ports = host['forwarded_ports']
ports.each do |port|
vm.network "forwarded_port", guest: port['guest'], host: port['host']
vm.network "forwarded_port", **{
guest: port['guest'],
host: port['host']
}.merge(VAGRANT_NETWORK_OPTIONS)
end
end
end
@ -140,7 +143,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
node.vm.box_url = host['box_url'] if host.key? 'box_url'
node.vm.hostname = host['name']
node.vm.network :private_network, network_options(host)
node.vm.network :private_network, **network_options(host)
custom_synced_folders(node.vm, host)
shell_provisioners_always(node.vm, host)
forwarded_ports(node.vm, host)