From 85e4865368d048f78e3f70a5149c0e97e2bd2fa1 Mon Sep 17 00:00:00 2001 From: Ilias Bertsimas Date: Mon, 29 Feb 2016 14:26:28 +0000 Subject: [PATCH] Make communicator's WinRM defaults more intuitive when using SSL. --- helper/communicator/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helper/communicator/config.go b/helper/communicator/config.go index 38e5482d9..81d347e92 100644 --- a/helper/communicator/config.go +++ b/helper/communicator/config.go @@ -137,7 +137,9 @@ func (c *Config) prepareSSH(ctx *interpolate.Context) []error { } func (c *Config) prepareWinRM(ctx *interpolate.Context) []error { - if c.WinRMPort == 0 { + if c.WinRMPort == 0 && c.WinRMUseSSL { + c.WinRMPort = 5986 + } else if c.WinRMPort == 0 { c.WinRMPort = 5985 }