1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

win_get_url doc/strict-mode fixes

plus cleaning up from bad merge
This commit is contained in:
nitzmahone 2015-12-19 01:11:35 -08:00 committed by Matt Clay
parent feb077261e
commit 317ea13759
2 changed files with 5 additions and 11 deletions

View file

@ -44,9 +44,9 @@ $skip_certificate_validation = Get-Attr $params "skip_certificate_validation" $f
$username = Get-Attr $params "username"
$password = Get-Attr $params "password"
$proxy_url = $params.proxy_url
$proxy_username = $params.proxy_username
$proxy_password = $params.proxy_password
$proxy_url = Get-Attr $params "proxy_url"
$proxy_username = Get-Attr $params "proxy_username"
$proxy_password = Get-Attr $params "proxy_password"
if($skip_certificate_validation){
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
@ -56,8 +56,8 @@ $force = Get-Attr -obj $params -name "force" "yes" | ConvertTo-Bool
If ($force -or -not (Test-Path $dest)) {
$client = New-Object System.Net.WebClient
if($params.proxy_url) {
$proxy_url = $params.proxy_url
if($proxy_url) {
$proxy_server = New-Object System.Net.WebProxy($proxy_url, $true)
if($proxy_username -and $proxy_password){
$proxy_credential = New-Object System.Net.NetworkCredential($proxy_username, $proxy_password)
$proxy_server.Credentials = $proxy_credential

View file

@ -70,22 +70,16 @@ options:
- The full URL of the proxy server to download through.
version_added: "2.0"
required: false
choices: null
default: null
proxy_username:
description:
- Proxy authentication username
version_added: "2.0"
required: false
choices: null
default: null
proxy_password:
description:
- Proxy authentication password
version_added: "2.0"
required: false
choices: null
default: null
author:
- "Paul Durivage (@angstwad)"
- "Takeshi Kuramochi (tksarah)"