Open lomignet opened 9 years ago
This is only a partial solution - please expand.
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,
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.