Dynamically generating hosts file (in the guest) and passing IP Address of host in Vagrantfile

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Dynamically generating hosts file (in the guest) and passing IP Address of host in Vagrantfile

Harihara Vinayakaram
Hi
   I am running Vagrant on my laptop. Windows7 64-bit  I normally use  this laptop  in 2 different locations (with different IP Address ranges configured via DHCP  ). One of the locations has a proxy and the other location does not have a proxy

     Every time I need to shutdown the guest VM , restart it and based on the location remove or add the proxy etc.  . Since I am using git i also need to update the /etc/hosts of the VM with the IP address of the host machine so that my git checkouts work

     I am using Chef-Solo for provisioning . I was wondering if there was a way to pass the IP Address of the host machine in the Vagrantfile to the VM so that I can use Chef and auto generate the files etc

     If there are any pointers do let me know

Regards
Hari

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.