Merge pull request #6553 from mitchellh/sethvargo/cleanup

Run provisioner cleanup tasks before destroying the VM
This commit is contained in:
Seth Vargo 2015-11-19 11:18:23 -08:00
commit bdea031a40
3 changed files with 4 additions and 2 deletions

View File

@ -156,12 +156,12 @@ module VagrantPlugins
b3.use Call, DestroyConfirm do |env3, b4|
if env3[:result]
b4.use ConfigValidate
b4.use ProvisionerCleanup, :before
b4.use EnvSet, force_halt: true
b4.use action_halt
b4.use HostMachineSyncFoldersDisable
b4.use Destroy
b4.use DestroyBuildImage
b4.use ProvisionerCleanup
else
b4.use Message,
I18n.t("docker_provider.messages.will_not_destroy")

View File

@ -38,6 +38,7 @@ module VagrantPlugins
end
b2.use ConfigValidate
b4.use ProvisionerCleanup, :before
b2.use StopInstance
b2.use DeleteVM
end

View File

@ -95,13 +95,14 @@ module VagrantPlugins
b2.use Call, DestroyConfirm do |env2, b3|
if env2[:result]
b3.use ConfigValidate
b3.use ProvisionerCleanup, :before
b3.use CheckAccessible
b3.use EnvSet, force_halt: true
b3.use action_halt
b3.use Destroy
b3.use CleanMachineFolder
b3.use DestroyUnusedNetworkInterfaces
b3.use ProvisionerCleanup
b3.use PrepareNFSValidIds
b3.use SyncedFolderCleanup
else