Skip to content

Commit

Permalink
Add BatchMode to vagrant ssh options
Browse files Browse the repository at this point in the history
This way, when ssh prompt us for the password, for instance when the ssh-key
has not yet been setup, we fail the ssh action, and vagrant will retry until
the ssh-key is installed and ssh is really available
  • Loading branch information
julienvey committed Nov 6, 2014
1 parent bbc2cfb commit 8042a54
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def server_is_reachable?(env, timeout)
end

env[:ssh_run_command] = 'exit 0'
env[:ssh_opts] = {
extra_args: ['-o', 'BatchMode=yes']
}
@ssh.call(env)
return true if env[:ssh_run_exit_status] == 0

Expand Down

0 comments on commit 8042a54

Please sign in to comment.