win_uri: fix creates/remotes - manual cherry-picking for pull 36016 for stable-2.4
This commit is contained in:
parent
cc7dfdeb52
commit
f37cba14ac
1 changed files with 8 additions and 8 deletions
|
@ -54,6 +54,14 @@ $use_basic_parsing = Get-AnsibleParam -obj $params -name "use_basic_parsing" -ty
|
|||
$validate_certs = Get-AnsibleParam -obj $params -name "validate_certs" -type "bool" -default $true
|
||||
$client_cert = Get-AnsibleParam -obj $params -name "client_cert" -type "path"
|
||||
|
||||
$result = @{
|
||||
changed = $false
|
||||
content_type = $content_type
|
||||
method = $method
|
||||
url = $url
|
||||
use_basic_parsing = $use_basic_parsing
|
||||
}
|
||||
|
||||
if ($creates -and (Test-Path -Path $creates)) {
|
||||
$result.skipped = $true
|
||||
Exit-Json $result "The 'creates' file or directory ($creates) already exists."
|
||||
|
@ -64,14 +72,6 @@ if ($removes -and -not (Test-Path -Path $removes)) {
|
|||
Exit-Json $result "The 'removes' file or directory ($removes) does not exist."
|
||||
}
|
||||
|
||||
$result = @{
|
||||
changed = $false
|
||||
content_type = $content_type
|
||||
method = $method
|
||||
url = $url
|
||||
use_basic_parsing = $use_basic_parsing
|
||||
}
|
||||
|
||||
# Disable redirection if requested
|
||||
switch($follow_redirects) {
|
||||
"none" {
|
||||
|
|
Loading…
Reference in a new issue