Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent wiping of addresses of other providers #169

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

lomignet
Copy link

@lomignet lomignet commented Nov 6, 2015

Hostmanager can only deal with one provider at a time.

If you vagrant up a virtualbox vm, then an aws, all information
of your virtualbox vm will be removed from /etc/hosts on the host.

By adding the provider type in the header/footer of the hostmanager
section of /etc/hosts, we can have one section per provider and
thus keep all machines no matter the provider.

Damien Joldersma and others added 5 commits November 14, 2014 12:42
Add information that the usual sudo group on Fedora/Red Hat systems is
named 'wheel'.
Generalize instructions to make them distribution-agnostic.
Add step on adding yourself to the administrator group.
Hostmanager can only deal with one provider at a time.

If you `vagrant up` a virtualbox vm, then an aws, all information
of your virtulabox vm will be removed from /etc/hosts on the host.

By adding the provider type in the header/footer of the hostmanager
section of /etc/hosts, we can have one section per provider and
thus keep all machines, no matter the provider.
@seth-reeser
Copy link
Member

This is only a partial solution - please expand.

@lomignet
Copy link
Author

Hi,

Would you mind expanding on why this is only partial? :)

My understanding is that vagrant-hostmanager when updating a host file basically recreates its block from scratch every time. As Vagrant cannot manage more than one provider per run, this means that if I am dealing with a say virtualbox VM and hostmanager wipe outs all vagrant entries, there is no way to find again VMs backed up by another provider, AWS for instance.

My patch creates one block per provider, meaning that they all are independent and can be managed individually, fully recreated as required without impacting the other blocks.

Cheers,

seth-reeser and others added 20 commits January 15, 2016 12:53
…-sudo

Improve README.md for Passwordless sudo.
…permissions-on-etc-hosts

Ensure permissions on /etc/hosts stay intact
…nage-guest-flag

Fix for issue devopsgroup-io#108, add a flag to manage guest hosts file.
Hostmanager can only deal with one provider at a time.

If you `vagrant up` a virtualbox vm, then an aws, all information
of your virtulabox vm will be removed from /etc/hosts on the host.

By adding the provider type in the header/footer of the hostmanager
section of /etc/hosts, we can have one section per provider and
thus keep all machines, no matter the provider.
…tion

make separating aliases into multiple lines optional
Conflicts:
	test/Vagrantfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants