When redirecting local ports to hyper visor ports we need to configure WinRM ports as well as SSH ports.
This commit is contained in:
parent
f3cc413bbb
commit
bd0b1190f6
|
@ -33,6 +33,7 @@ type StepConnect struct {
|
|||
// WinRMConfig should return the default configuration for
|
||||
// connecting via WinRM.
|
||||
WinRMConfig func(multistep.StateBag) (*WinRMConfig, error)
|
||||
WinRMPort func(multistep.StateBag) (int, error)
|
||||
|
||||
// CustomConnect can be set to have custom connectors for specific
|
||||
// types. These take highest precedence so you can also override
|
||||
|
@ -55,7 +56,7 @@ func (s *StepConnect) Run(state multistep.StateBag) multistep.StepAction {
|
|||
Config: s.Config,
|
||||
Host: s.Host,
|
||||
WinRMConfig: s.WinRMConfig,
|
||||
WinRMPort: s.SSHPort,
|
||||
WinRMPort: s.WinRMPort,
|
||||
},
|
||||
}
|
||||
for k, v := range s.CustomConnect {
|
||||
|
|
|
@ -96,6 +96,7 @@ func (s *StepConnectWinRM) waitForWinRM(state multistep.StateBag, cancel <-chan
|
|||
log.Printf("[DEBUG] Error getting WinRM host: %s", err)
|
||||
continue
|
||||
}
|
||||
|
||||
port := s.Config.WinRMPort
|
||||
if s.WinRMPort != nil {
|
||||
port, err = s.WinRMPort(state)
|
||||
|
|
Loading…
Reference in New Issue