How to use vagrant.local hostname for vagrant virtual machine

From razwiki
Revision as of 03:11, 4 January 2022 by Razzi (talk | contribs) (Created page with "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 Woul...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.