Do not provision and configure when state is saved

This commit is contained in:
Chris Roberts 2018-07-06 15:49:36 -07:00
parent 630bc6540d
commit a9bc0bb800
1 changed files with 17 additions and 11 deletions

View File

@ -139,17 +139,23 @@ module VagrantPlugins
next next
end end
b2.use Provision b2.use Call, IsState, :saved do |env3, b3|
b2.use Configure # When state is `:saved` it is a snapshot being restored
b2.use SetName if !env3[:result]
b2.use NetSetVLan b3.use Provision
b2.use NetSetMac b3.use Configure
b2.use StartInstance b3.use SetName
b2.use WaitForIPAddress b3.use NetSetVLan
b2.use WaitForCommunicator, [:running] b3.use NetSetMac
b2.use SyncedFolderCleanup end
b2.use SyncedFolders
b2.use SetHostname b3.use StartInstance
b3.use WaitForIPAddress
b3.use WaitForCommunicator, [:running]
b3.use SyncedFolderCleanup
b3.use SyncedFolders
b3.use SetHostname
end
end end
end end
end end