-
Notifications
You must be signed in to change notification settings - Fork 148
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
call remove hosts on vagrant halt #56
Comments
Hi @weed0r23, unfortunately this is not doable in a reliable way because vagrant doesn't distinguish between machine states when giving us the list of machines that we put in the hosts file. Vagrant only distinguishes between 'created' and 'not created'. So even if we had a task set up on While there is a way to query the machine state (as you can see when you run I'm closing this for now, but feel free to reopen if you find a solution and you want to discuss it. |
Maybe it's possible to add at least partial support for some well-known or frequently used
|
https://github.com/cogitatio/vagrant-hostsupdater - seems to handle it fine. |
Hi,
I'd suggest to call the hosts cleanup task also on vagrant halt in addition to vagrant destroy. Because if the vm is down, the host entries don't make sense (in my opinion)
This would be similar to vagrant's core behaviour for the host entry.
Thanks for sharing this ext! ;)
kind regards
The text was updated successfully, but these errors were encountered: