From 5253801f92520a1261b00ae20f47a6fa6a80d338 Mon Sep 17 00:00:00 2001 From: hw Date: Sun, 7 Feb 2016 20:00:26 +0530 Subject: [PATCH] Use auto network only if hostmanager is installed --- Vagrantfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 492e3c1e..49d70fb0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -108,8 +108,9 @@ Vagrant.configure("2") do |config| # TO DO: Make this work with virtualhost along-side xip.io URL config.vm.hostname = hostname - # Create a static IP - if Vagrant.has_plugin?("vagrant-auto_network") + # Create a static IP. Use auto network only if hostmanager is installed as + # well as it is not straight-forward to figure out the assigned IP address. + if Vagrant.has_plugin?("vagrant-auto_network") and Vagrant.has_plugin?("vagrant-hostmanager") config.vm.network :private_network, :ip => "0.0.0.0", :auto_network => true else config.vm.network :private_network, ip: server_ip