patching network.rb to allow setting static ip's on public networks

This commit is contained in:
Jon Heise 2013-05-18 23:41:33 -07:00
parent ccfd321ef9
commit 7a89ab7fad
1 changed files with 11 additions and 0 deletions

View File

@ -200,6 +200,17 @@ module VagrantPlugins
end
def bridged_network_config(config)
if config[:ip]
options = {
:auto_config => true,
:mac => nil,
:netmask => "255.255.255.0",
:type => :static
}.merge(config)
options[:type] = options[:type].to_sym
return options
end
return {
:type => :dhcp,
:use_dhcp_assigned_default_route => config[:use_dhcp_assigned_default_route]