devopsgroup-io / vagrant-hostmanager

:pencil: A Vagrant plugin that manages hosts files within a multi-machine environment.
Mozilla Public License 2.0
1.46k stars 146 forks source link

hostname associated to loopback #150

Closed rmacian closed 8 years ago

rmacian commented 9 years ago

I don't know if there is any option to fix this but when I set a multimachine vagrantfile I got

vagrant@master ~]$ cat /etc/hosts
127.0.0.1   master localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

## vagrant-hostmanager-start
172.16.1.120    master
172.16.1.121    proxy2
172.16.1.100    webserver1
172.16.1.101    webserver2
172.16.1.102    webserver3
172.16.1.105    webserver4
172.16.1.106    webserver5
172.16.1.110    mgmt1
172.16.1.111    datanode1
172.16.1.112    sqlnode1
## vagrant-hostmanager-end

I do not want the hostname "master" to be attached to the loopback interface, the plugin defines it below with the IP

bearrito commented 8 years ago

I have the same issue. What more information would you like?

seth-reeser commented 8 years ago

vagrant-hostmanager isn't the correct scope to manage the loopback as this would just get overwritten by Vagrant - see http://stackoverflow.com/questions/33117939/vagrant-do-not-map-hostname-to-loopback-address-in-etc-hosts for a solution.