|
|
|
@ -91,7 +91,7 @@ options:
|
|
|
|
|
where C(yes) is the equivalent of C(all) and C(no) is the equivalent of C(safe). C(yes) and C(no)
|
|
|
|
|
are deprecated and will be removed in some future version of Ansible.
|
|
|
|
|
type: str
|
|
|
|
|
choices: [ all, 'none', safe ]
|
|
|
|
|
choices: ['all', 'no', 'none', 'safe', 'urllib2', 'yes']
|
|
|
|
|
default: safe
|
|
|
|
|
creates:
|
|
|
|
|
description:
|
|
|
|
@ -111,14 +111,6 @@ options:
|
|
|
|
|
- The socket level timeout in seconds
|
|
|
|
|
type: int
|
|
|
|
|
default: 30
|
|
|
|
|
HEADER_:
|
|
|
|
|
description:
|
|
|
|
|
- Any parameter starting with "HEADER_" is a sent with your request as a header.
|
|
|
|
|
For example, HEADER_Content-Type="application/json" would send the header
|
|
|
|
|
"Content-Type" along with your request with a value of "application/json".
|
|
|
|
|
- This option is deprecated as of C(2.1) and will be removed in Ansible 2.9.
|
|
|
|
|
Use I(headers) instead.
|
|
|
|
|
type: dict
|
|
|
|
|
headers:
|
|
|
|
|
description:
|
|
|
|
|
- Add custom HTTP headers to a request in the format of a YAML hash. As
|
|
|
|
@ -126,9 +118,6 @@ options:
|
|
|
|
|
generated by supplying C(json) or C(form-urlencoded) for I(body_format).
|
|
|
|
|
type: dict
|
|
|
|
|
version_added: '2.1'
|
|
|
|
|
others:
|
|
|
|
|
description:
|
|
|
|
|
- All arguments accepted by the M(file) module also work here
|
|
|
|
|
validate_certs:
|
|
|
|
|
description:
|
|
|
|
|
- If C(no), SSL certificates will not be validated.
|
|
|
|
@ -191,6 +180,7 @@ seealso:
|
|
|
|
|
- module: win_uri
|
|
|
|
|
author:
|
|
|
|
|
- Romeo Theriault (@romeotheriault)
|
|
|
|
|
extends_documentation_fragment: files
|
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
EXAMPLES = r'''
|
|
|
|
@ -531,8 +521,6 @@ def main():
|
|
|
|
|
|
|
|
|
|
module = AnsibleModule(
|
|
|
|
|
argument_spec=argument_spec,
|
|
|
|
|
# TODO: Remove check_invalid_arguments in 2.9
|
|
|
|
|
check_invalid_arguments=False,
|
|
|
|
|
add_file_common_args=True,
|
|
|
|
|
mutually_exclusive=[['body', 'src']],
|
|
|
|
|
)
|
|
|
|
@ -568,17 +556,6 @@ def main():
|
|
|
|
|
if 'content-type' not in [header.lower() for header in dict_headers]:
|
|
|
|
|
dict_headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
|
|
|
|
|
|
|
|
|
# TODO: Deprecated section. Remove in Ansible 2.9
|
|
|
|
|
# Grab all the http headers. Need this hack since passing multi-values is
|
|
|
|
|
# currently a bit ugly. (e.g. headers='{"Content-Type":"application/json"}')
|
|
|
|
|
for key, value in iteritems(module.params):
|
|
|
|
|
if key.startswith("HEADER_"):
|
|
|
|
|
module.deprecate('Supplying headers via HEADER_* is deprecated. Please use `headers` to'
|
|
|
|
|
' supply headers for the request', version='2.9')
|
|
|
|
|
skey = key.replace("HEADER_", "")
|
|
|
|
|
dict_headers[skey] = value
|
|
|
|
|
# End deprecated section
|
|
|
|
|
|
|
|
|
|
if creates is not None:
|
|
|
|
|
# do not run the command if the line contains creates=filename
|
|
|
|
|
# and the filename already exists. This allows idempotence
|
|
|
|
|