providers/docker: graceful halt only if SSH is available

This commit is contained in:
Mitchell Hashimoto 2014-04-17 17:03:54 -07:00
parent 4a59c5c522
commit 81818f36fc
1 changed files with 8 additions and 1 deletions

View File

@ -53,9 +53,16 @@ module VagrantPlugins
next
end
b2.use Call, GracefulHalt, :stopped, :running do |env2, b3|
b2.use Call, HasSSH do |env2, b3|
if !env2[:result]
b3.use Stop
next
end
b3.use Call, GracefulHalt, :stopped, :running do |env3, b4|
if !env3[:result]
b4.use Stop
end
end
end
end