Merge pull request #2351 from mitchellh/f-winrm-debug
builder/amazon: output WinRM password for debug mode [GH-2336]
This commit is contained in:
commit
d3ed169175
@ -19,6 +19,7 @@ import (
|
|||||||
// StepGetPassword reads the password from a Windows server and sets it
|
// StepGetPassword reads the password from a Windows server and sets it
|
||||||
// on the WinRM config.
|
// on the WinRM config.
|
||||||
type StepGetPassword struct {
|
type StepGetPassword struct {
|
||||||
|
Debug bool
|
||||||
Comm *communicator.Config
|
Comm *communicator.Config
|
||||||
Timeout time.Duration
|
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
|
return multistep.ActionContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,6 +119,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||||||
Tags: b.config.RunTags,
|
Tags: b.config.RunTags,
|
||||||
},
|
},
|
||||||
&awscommon.StepGetPassword{
|
&awscommon.StepGetPassword{
|
||||||
|
Debug: b.config.PackerDebug,
|
||||||
Comm: &b.config.RunConfig.Comm,
|
Comm: &b.config.RunConfig.Comm,
|
||||||
Timeout: b.config.WindowsPasswordTimeout,
|
Timeout: b.config.WindowsPasswordTimeout,
|
||||||
},
|
},
|
||||||
|
@ -204,6 +204,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||||||
Tags: b.config.RunTags,
|
Tags: b.config.RunTags,
|
||||||
},
|
},
|
||||||
&awscommon.StepGetPassword{
|
&awscommon.StepGetPassword{
|
||||||
|
Debug: b.config.PackerDebug,
|
||||||
Comm: &b.config.RunConfig.Comm,
|
Comm: &b.config.RunConfig.Comm,
|
||||||
Timeout: b.config.WindowsPasswordTimeout,
|
Timeout: b.config.WindowsPasswordTimeout,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user