diff --git a/changelogs/fragments/209-fix-port-ref.yml b/changelogs/fragments/209-fix-port-ref.yml new file mode 100644 index 00000000..39b7a483 --- /dev/null +++ b/changelogs/fragments/209-fix-port-ref.yml @@ -0,0 +1,2 @@ +bugfixes: + - Get port properly from AG Listener when comparing to input port value. diff --git a/changelogs/fragments/release-summary-2-2-2.yml b/changelogs/fragments/release-summary-2-2-2.yml new file mode 100644 index 00000000..e66500f1 --- /dev/null +++ b/changelogs/fragments/release-summary-2-2-2.yml @@ -0,0 +1 @@ +release_summary: Minor bugfix for setting the port on an AG listener. diff --git a/galaxy.yml b/galaxy.yml index b66619e2..091bfe36 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -2,7 +2,7 @@ namespace: lowlydba name: sqlserver -version: 2.2.1 +version: 2.2.2 readme: README.md authors: - John McCall (github.com/lowlydba) diff --git a/plugins/modules/ag_listener.ps1 b/plugins/modules/ag_listener.ps1 index bd4df2d6..e20238ed 100644 --- a/plugins/modules/ag_listener.ps1 +++ b/plugins/modules/ag_listener.ps1 @@ -63,7 +63,7 @@ try { $output = Add-DbaAgListener @listenerParams $module.Result.changed = $true } - elseif ($existingListener.Port -ne $port) { + elseif ($existingListener.PortNumber -ne $port) { $output = Set-DbaAgListener -AvailabilityGroup $agName -Listener $listenerName -Port $port $module.Result.changed = $true }