guests/coreos: proper guest IP detection [GH-2146]
This commit is contained in:
parent
322fd085dd
commit
517ac20822
|
@ -11,6 +11,7 @@ BUG FIXES:
|
||||||
- core: Handle the case where we get an EACCES cleaning up the .vagrant
|
- core: Handle the case where we get an EACCES cleaning up the .vagrant
|
||||||
directory.
|
directory.
|
||||||
- core: Fix exception on upgrade warnings from V1 to V2. [GH-2142]
|
- core: Fix exception on upgrade warnings from V1 to V2. [GH-2142]
|
||||||
|
- guests/coreos: Proper IP detection. [GH-2146]
|
||||||
- hosts/linux: NFS exporting works properly again. [GH-2137]
|
- hosts/linux: NFS exporting works properly again. [GH-2137]
|
||||||
- provisioners/chef: Work even with restrictive umask on user. [GH-2121]
|
- provisioners/chef: Work even with restrictive umask on user. [GH-2121]
|
||||||
- provisioners/chef: Fix environment validation to be less restrictive.
|
- provisioners/chef: Fix environment validation to be less restrictive.
|
||||||
|
|
|
@ -28,9 +28,16 @@ module VagrantPlugins
|
||||||
primary_machine_config = machine.env.active_machines.first
|
primary_machine_config = machine.env.active_machines.first
|
||||||
primary_machine = machine.env.machine(*primary_machine_config, true)
|
primary_machine = machine.env.machine(*primary_machine_config, true)
|
||||||
|
|
||||||
get_ip = ->(machine) do
|
get_ip = lambda do |machine|
|
||||||
_, network_config = machine.config.vm.networks.detect { |type, _| type == :private_network}
|
ip = nil
|
||||||
network_config[:ip]
|
machine.config.vm.networks.each do |type, opts|
|
||||||
|
if type == :private_network && opts[:ip]
|
||||||
|
ip = opts[:ip]
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
ip
|
||||||
end
|
end
|
||||||
|
|
||||||
primary_machine_ip = get_ip.(primary_machine)
|
primary_machine_ip = get_ip.(primary_machine)
|
||||||
|
|
Loading…
Reference in New Issue