builder/amazon: output WinRM password for debug mode [GH-2336]

This commit is contained in:
Mitchell Hashimoto 2015-06-29 09:40:15 -07:00
parent 1aef60ff76
commit 0a2e54feaf
1 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,7 @@ import (
// StepGetPassword reads the password from a Windows server and sets it
// on the WinRM config.
type StepGetPassword struct {
Debug bool
Comm *communicator.Config
Timeout time.Duration
}
@ -85,6 +86,13 @@ WaitLoop:
}
}
}
// In debug-mode, we output the password
if s.Debug {
ui.Message(fmt.Sprintf(
"Password (since debug is enabled): %s", s.Comm.WinRMPassword))
}
return multistep.ActionContinue
}