goodhosts / vagrant

Vagrant plugin that use goodhosts to manipulate hosts files
https://rubygems.org/gems/vagrant-goodhosts/
MIT License
17 stars 8 forks source link

Remove hosts on destroy, halt, and suspend #38

Closed ajxb closed 3 years ago

ajxb commented 3 years ago

Here's a potential fix for issue #37

I've tested the following situations:

Command remove_on_suspend = true remove_on_suspend = false
destroy hosts removed hosts removed
halt hosts removed hosts not removed
suspend hosts removed hosts not removed

I need to point out that this fix highlights a problem with the vagrant resume command not executing the UpdateHosts action.

ajxb commented 3 years ago

I think this fixes the vagrant destroy problem mentioned by @benlumia007 in #35