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

pull/67105/head
Jordan Borean 5 years ago committed by GitHub
parent be9471b251
commit 6d792838e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

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

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

Loading…
Cancel
Save