Compatibility with vagrant 2.2.17 and up
This commit is contained in:
parent
f8a1f62d29
commit
bd6ea4c54d
7
Vagrantfile
vendored
7
Vagrantfile
vendored
@ -111,7 +111,10 @@ def forwarded_ports(vm, host)
|
|||||||
ports = host['forwarded_ports']
|
ports = host['forwarded_ports']
|
||||||
|
|
||||||
ports.each do |port|
|
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
|
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.box_url = host['box_url'] if host.key? 'box_url'
|
||||||
|
|
||||||
node.vm.hostname = host['name']
|
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)
|
custom_synced_folders(node.vm, host)
|
||||||
shell_provisioners_always(node.vm, host)
|
shell_provisioners_always(node.vm, host)
|
||||||
forwarded_ports(node.vm, host)
|
forwarded_ports(node.vm, host)
|
||||||
|
Loading…
Reference in New Issue
Block a user