diff --git a/CHANGES.md b/CHANGES.md index 6b6e994..d441ca5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Change log - CloudControl plugins for Packer +## v0.1.3-beta3 + +* Fix WinRM port bug (partially in Packer). + ## v0.1.3-beta2 * Fix incorrect population of WinRM password. diff --git a/CommonVars.inc b/CommonVars.inc index a72332b..c00a3e2 100644 --- a/CommonVars.inc +++ b/CommonVars.inc @@ -1,4 +1,4 @@ -VERSION = 0.1.3-beta2 +VERSION = 0.1.3-beta3 VERSION_INFO_FILE = ./version-info.go BUILDER_PLUGIN_NAMES = customerimage customerimage-import diff --git a/builders/customerimage/builder.go b/builders/customerimage/builder.go index 9c39d66..a80d2e0 100644 --- a/builders/customerimage/builder.go +++ b/builders/customerimage/builder.go @@ -92,6 +92,7 @@ func (builder *Builder) Prepare(settings ...interface{}) (warnings []string, err SSHPort: getSSHPort, SSHConfig: getSSHConfig, WinRMConfig: getWinRMConfig, + WinRMPort: getWinRMPort, }, &common.StepProvision{}, &steps.CloneServer{}, @@ -180,3 +181,10 @@ func getWinRMConfig(state multistep.StateBag) (winRMConfig *communicator.WinRMCo return } + +func getWinRMPort(state multistep.StateBag) (port int, err error) { + settings := state.Get("settings").(*config.Settings) + port = settings.CommunicatorConfig.WinRMPort + + return +} diff --git a/init.sh b/init.sh old mode 100755 new mode 100644