How to use vagrant.local hostname for vagrant virtual machine

From razwiki
Jump to navigation Jump to search

Use

config.vm.network "private_network", ip: "192.168.33.10"

then manually edit /etc/hosts

192.168.33.10 vagrant.local

I think there was a plugin that would do this

Would be a good heuristic to use the folder name to set the hostname. But then I'd have to manually name my vms. Maybe it's time for a heroku-like name generator, but inspired by ubuntu so it uses an alphabetical approach. Animal names are nice.