From 4be10b428a78126b012fe6d18b78f790d19b4c58 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 13 Jun 2015 22:07:17 -0700 Subject: [PATCH] helper/communicator: hook up WinRM --- helper/communicator/step_connect.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/helper/communicator/step_connect.go b/helper/communicator/step_connect.go index a31dd4eb8..ce77333e1 100644 --- a/helper/communicator/step_connect.go +++ b/helper/communicator/step_connect.go @@ -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]