Homestead and Auto Setup Hosts File

Posted: 2016-06-05 21:07:40

I discovered this Vagrant Plugin https://github.com/cogitatio/vagrant-hostsupdater thanks to https://github.com/cogitatio/vagrant-hostsupdater when setting up Windows and thought why can't I use it on my Mac?

Just like the docs say on their github site

vagrant plugin install vagrant-hostsupdater

Then update your ruby file that setups up homestead

subl ~/Homestead/scripts/homestead.rb

This will look like alias

Then

subl ~/.homestead/Homestead.yaml

And make that like this

homestead

Then run provision

cd ~/Homestead
vagrant provision

That is it now your /etc/hosts file will look like this

homestead