Run provisioner cleanup tasks before destroying the VM
This commit is contained in:
parent
ad897aed39
commit
825bd6d5ef
|
@ -156,12 +156,12 @@ module VagrantPlugins
|
||||||
b3.use Call, DestroyConfirm do |env3, b4|
|
b3.use Call, DestroyConfirm do |env3, b4|
|
||||||
if env3[:result]
|
if env3[:result]
|
||||||
b4.use ConfigValidate
|
b4.use ConfigValidate
|
||||||
|
b4.use ProvisionerCleanup, :before
|
||||||
b4.use EnvSet, force_halt: true
|
b4.use EnvSet, force_halt: true
|
||||||
b4.use action_halt
|
b4.use action_halt
|
||||||
b4.use HostMachineSyncFoldersDisable
|
b4.use HostMachineSyncFoldersDisable
|
||||||
b4.use Destroy
|
b4.use Destroy
|
||||||
b4.use DestroyBuildImage
|
b4.use DestroyBuildImage
|
||||||
b4.use ProvisionerCleanup
|
|
||||||
else
|
else
|
||||||
b4.use Message,
|
b4.use Message,
|
||||||
I18n.t("docker_provider.messages.will_not_destroy")
|
I18n.t("docker_provider.messages.will_not_destroy")
|
||||||
|
|
|
@ -38,6 +38,7 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
b2.use ConfigValidate
|
b2.use ConfigValidate
|
||||||
|
b4.use ProvisionerCleanup, :before
|
||||||
b2.use StopInstance
|
b2.use StopInstance
|
||||||
b2.use DeleteVM
|
b2.use DeleteVM
|
||||||
end
|
end
|
||||||
|
|
|
@ -95,13 +95,14 @@ module VagrantPlugins
|
||||||
|
|
||||||
b2.use Call, DestroyConfirm do |env2, b3|
|
b2.use Call, DestroyConfirm do |env2, b3|
|
||||||
if env2[:result]
|
if env2[:result]
|
||||||
|
b3.use ConfigValidate
|
||||||
|
b3.use ProvisionerCleanup, :before
|
||||||
b3.use CheckAccessible
|
b3.use CheckAccessible
|
||||||
b3.use EnvSet, force_halt: true
|
b3.use EnvSet, force_halt: true
|
||||||
b3.use action_halt
|
b3.use action_halt
|
||||||
b3.use Destroy
|
b3.use Destroy
|
||||||
b3.use CleanMachineFolder
|
b3.use CleanMachineFolder
|
||||||
b3.use DestroyUnusedNetworkInterfaces
|
b3.use DestroyUnusedNetworkInterfaces
|
||||||
b3.use ProvisionerCleanup
|
|
||||||
b3.use PrepareNFSValidIds
|
b3.use PrepareNFSValidIds
|
||||||
b3.use SyncedFolderCleanup
|
b3.use SyncedFolderCleanup
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue