Move url option from util to individual modules (#67068)

This commit is contained in:
Jordan Borean 2020-02-04 10:43:33 +10:00 committed by GitHub
parent be9471b251
commit 6d792838e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 7 deletions

View file

@ -519,7 +519,6 @@ Function Merge-WebRequestSpec {
}
$ansible_web_request_options = @{
url = @{ type="str"; required=$true }
method = @{ type="str" }
follow_redirects = @{ type="str"; choices=@("all","none","safe"); default="safe" }
headers = @{ type="dict" }

View file

@ -13,6 +13,7 @@
$spec = @{
options = @{
url = @{ type="str"; required=$true }
dest = @{ type='path'; required=$true }
force = @{ type='bool'; default=$true }
checksum = @{ type='str' }

View file

@ -12,6 +12,7 @@
$spec = @{
options = @{
url = @{ type = "str"; required = $true }
content_type = @{ type = "str" }
body = @{ type = "raw" }
dest = @{ type = "path" }
@ -73,7 +74,7 @@ if ($removes -and -not (Test-AnsiblePath -Path $removes)) {
$module.ExitJson()
}
$client = Get-AnsibleWebRequest -Module $module
$client = Get-AnsibleWebRequest -Uri $url -Module $module
if ($null -ne $content_type) {
$client.ContentType = $content_type

View file

@ -12,11 +12,6 @@ class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = r'''
options:
url:
description:
- The URL to make the request with.
required: yes
type: str
method:
description:
- The HTTP Method of the request.