helper/communicator: hook up WinRM

This commit is contained in:
Mitchell Hashimoto 2015-06-13 22:07:17 -07:00
parent 7a39758054
commit 4be10b428a
1 changed files with 11 additions and 0 deletions

View File

@ -26,6 +26,12 @@ type StepConnect struct {
SSHConfig func(multistep.StateBag) (*gossh.ClientConfig, error)
SSHPort func(multistep.StateBag) (int, error)
// The fields below are callbacks to assist with connecting to WinRM.
//
// WinRMConfig should return the default configuration for
// connecting via WinRM.
WinRMConfig func(multistep.StateBag) (*WinRMConfig, error)
substep multistep.Step
}
@ -38,6 +44,11 @@ func (s *StepConnect) Run(state multistep.StateBag) multistep.StepAction {
SSHConfig: s.SSHConfig,
SSHPort: s.SSHPort,
},
"winrm": &StepConnectWinRM{
Config: s.Config,
Host: s.Host,
WinRMConfig: s.WinRMConfig,
},
}
step, ok := typeMap[s.Config.Type]