Move url option from util to individual modules (#67068)
This commit is contained in:
parent
be9471b251
commit
6d792838e4
4 changed files with 3 additions and 7 deletions
|
@ -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" }
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
$spec = @{
|
||||
options = @{
|
||||
url = @{ type="str"; required=$true }
|
||||
dest = @{ type='path'; required=$true }
|
||||
force = @{ type='bool'; default=$true }
|
||||
checksum = @{ type='str' }
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue