summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Borean <jborean93@gmail.com>2020-02-04 10:43:33 +1000
committerGitHub <noreply@github.com>2020-02-04 10:43:33 +1000
commit6d792838e49103bef076d5c4807e92a2cfc71015 (patch)
tree2152c4d222dc7681a03fd6226d5709a1c76209cb
parentbe9471b251d8ad76b7e1866a871d79b8b0e3255a (diff)
downloadansible-6d792838e49103bef076d5c4807e92a2cfc71015.tar.gz
Move url option from util to individual modules (#67068)
-rw-r--r--lib/ansible/module_utils/powershell/Ansible.ModuleUtils.WebRequest.psm11
-rw-r--r--lib/ansible/modules/windows/win_get_url.ps11
-rw-r--r--lib/ansible/modules/windows/win_uri.ps13
-rw-r--r--lib/ansible/plugins/doc_fragments/url_windows.py5
4 files changed, 3 insertions, 7 deletions
diff --git a/lib/ansible/module_utils/powershell/Ansible.ModuleUtils.WebRequest.psm1 b/lib/ansible/module_utils/powershell/Ansible.ModuleUtils.WebRequest.psm1
index 456365102b..fffb5f4783 100644
--- a/lib/ansible/module_utils/powershell/Ansible.ModuleUtils.WebRequest.psm1
+++ b/lib/ansible/module_utils/powershell/Ansible.ModuleUtils.WebRequest.psm1
@@ -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" }
diff --git a/lib/ansible/modules/windows/win_get_url.ps1 b/lib/ansible/modules/windows/win_get_url.ps1
index b463056631..a4c6e13d32 100644
--- a/lib/ansible/modules/windows/win_get_url.ps1
+++ b/lib/ansible/modules/windows/win_get_url.ps1
@@ -13,6 +13,7 @@
$spec = @{
options = @{
+ url = @{ type="str"; required=$true }
dest = @{ type='path'; required=$true }
force = @{ type='bool'; default=$true }
checksum = @{ type='str' }
diff --git a/lib/ansible/modules/windows/win_uri.ps1 b/lib/ansible/modules/windows/win_uri.ps1
index a84d7ed8d8..09ccf1b0b3 100644
--- a/lib/ansible/modules/windows/win_uri.ps1
+++ b/lib/ansible/modules/windows/win_uri.ps1
@@ -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
diff --git a/lib/ansible/plugins/doc_fragments/url_windows.py b/lib/ansible/plugins/doc_fragments/url_windows.py
index 1076045ae1..29a5be311f 100644
--- a/lib/ansible/plugins/doc_fragments/url_windows.py
+++ b/lib/ansible/plugins/doc_fragments/url_windows.py
@@ -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.