From 2498e053f985c7351e65920d193d9dd8726131bc Mon Sep 17 00:00:00 2001 From: Andrew Yongjoon Kong Date: Thu, 16 Jan 2014 17:18:49 +0900 Subject: [PATCH] only first private_network is used this will prevent using last private_network for the hostname --- lib/vagrant-hostmanager/hosts_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant-hostmanager/hosts_file.rb b/lib/vagrant-hostmanager/hosts_file.rb index e7f0f80..d11f695 100644 --- a/lib/vagrant-hostmanager/hosts_file.rb +++ b/lib/vagrant-hostmanager/hosts_file.rb @@ -104,7 +104,7 @@ module VagrantPlugins machine.config.vm.networks.each do |network| key, options = network[0], network[1] ip = options[:ip] if key == :private_network - next if ip + break if ip end end ip || (machine.ssh_info ? machine.ssh_info[:host] : nil)