mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
simplify
This commit is contained in:
parent
a51f2eba2f
commit
4cd1236e9a
@ -121,12 +121,8 @@ module VagrantPlugins
|
||||
# Set IP address of network (actually bridge). It will be used as
|
||||
# gateway address for machines connected to this network.
|
||||
net = IPAddr.new(net_address)
|
||||
if @options[:host_ip].nil?
|
||||
# Default to first address (after network name)
|
||||
@interface_network[:ip_address] = net.to_range.begin.succ
|
||||
else
|
||||
@interface_network[:ip_address] = IPAddr.new @options[:host_ip]
|
||||
end
|
||||
# Default to first address (after network name)
|
||||
@interface_network[:ip_address] = @options[:host_ip].nil? ? net.to_range.begin.succ : IPAddr.new @options[:host_ip]
|
||||
|
||||
# Is there an available network matching to configured ip
|
||||
# address?
|
||||
|
Loading…
Reference in New Issue
Block a user