From bd6ea4c54d2fdb9176870db188e6ac0a976e8e47 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Tue, 20 Jul 2021 15:12:24 +0200 Subject: [PATCH] Compatibility with vagrant 2.2.17 and up --- Vagrantfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 49f9249..691d05c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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)