diff --git a/changelogs/fragments/win_get_url-proxy-not-used.yml b/changelogs/fragments/win_get_url-proxy-not-used.yml new file mode 100644 index 0000000000..729027305f --- /dev/null +++ b/changelogs/fragments/win_get_url-proxy-not-used.yml @@ -0,0 +1,2 @@ +bugfixes: + - "win_get_url - Fix proxy_url not used correctly (https://github.com/ansible/ansible/issues/58691)" \ No newline at end of file diff --git a/lib/ansible/modules/windows/win_get_url.ps1 b/lib/ansible/modules/windows/win_get_url.ps1 index 8f3af457e3..a75f226350 100644 --- a/lib/ansible/modules/windows/win_get_url.ps1 +++ b/lib/ansible/modules/windows/win_get_url.ps1 @@ -108,7 +108,7 @@ Function Invoke-AnsibleWebRequest { if (-not $UseProxy) { $web_request.Proxy = $null - } elseif ($ProxyUri) { + } elseif ($Proxy) { $web_request.Proxy = $Proxy }