mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-19 06:21:41 -04:00
amazon builder: only fetch password for winrm
This commit is contained in:
@@ -26,11 +26,10 @@ type StepGetPassword struct {
|
||||
|
||||
func (s *StepGetPassword) Run(state multistep.StateBag) multistep.StepAction {
|
||||
ui := state.Get("ui").(packer.Ui)
|
||||
image := state.Get("source_image").(*ec2.Image)
|
||||
|
||||
// Skip if we're not Windows...
|
||||
if image.Platform == nil || *image.Platform != "windows" {
|
||||
log.Printf("[INFO] Not Windows, skipping get password...")
|
||||
// Skip if we're not using winrm
|
||||
if s.Comm.Type != "winrm" {
|
||||
log.Printf("[INFO] Not using winrm communicator, skipping get password...")
|
||||
return multistep.ActionContinue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user