Comments (2)
Hi @kminder, the 127.0.0.1 ...
line in the hosts file is changed by vagrant itself when it configures the guest's hostname. vagrant-hostmanager only touches the lines that it adds.
Cleaning the 127.0.0.1 line could be done, as you suggested, but at a first glance it looks to me like this is a very specific case of a more general issue.
At the moment, there are two guests OS types where vagrant updates /etc/hosts in a similar way: Redhat/Centos and Debian/Ubuntu. In the Debian case, it actually adds a 127.0.1.1 line - I'm not exactly sure why. I think if we were to edit only the 127.0.0.1 line, we would still have this issue in Debian/Ubuntu guests.
It seems to me that in general we would want hostmanager to remove any names in /etc/hosts that conflict with the ones it is to add.
I think this would involve some parsing etc/hosts to find these entries, and for each one, take out the conflicting names in that line while leaving the rest of the entry if there are other names, (skipping comment lines and so on).
What do you think?
Is this something you would be interested in contributing?
from vagrant-hostmanager.
Closing this. If you'd like to look into it further, feel free to reopen.
from vagrant-hostmanager.
Related Issues (20)
- Provision with hostmanager randomly fails HOT 5
- hostmanager starts when "-h" or "--help" flags are issued HOT 1
- ignore_private_ip = false still uses public ip on AWS
- manage_guests breaks with multiple machines
- Update docker container host files, when no SSH is available
- hostmanager does not update /etc/hosts on centos7 guests HOT 1
- generic/debian10 box looks to be mistakenly detected as a MacOS guest HOT 2
- vagrant reload and vagrant halt
- plugin is broken on Vagrant 2.2.13 HOT 5
- warning: Using the last argument as keyword parameters is deprecated;
- Update Host: Windows + git bash running vagrant leads to line ending confusion and two dozen UAC prompts while trying to change the hosts file HOT 16
- Hostmanager should update both WSL2 host and guest
- Host file contains the address of just one machine
- on windows with vmware provider, it adds 127.0.0.1 to my hosts file for the VM.
- [Vagrant 2.2.16] [1.8.9] hostmanager doesn't run before "up"; needs to run before vagrant-registration plugin
- vagrant hostmanager plugin isnt getting install on windows 10 , vagrant 2.2.19 HOT 1
- SSL verification error at depth 3 HOT 3
- Updating guest fails on vagrant >= 2.3.5 HOT 5
- Issue while vagrant up command
- I am not able to bringup vms while setting up for Vprofile project locally and setup all the services(Nginx, Tomcat, RabbitMQ, Memcached, MySQL)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vagrant-hostmanager.