Parameter |
Choices/Defaults |
Comments |
body
|
|
The body of the http request/response to the web service. If body_format is set to 'json' it will take an already formatted JSON string or convert a data structure into JSON. If body_format is set to 'form-urlencoded' it will convert a dictionary or list of tuples into an 'application/x-www-form-urlencoded' string. (Added in v2.7)
|
body_format
(added in 2.0) |
Choices:
- form-urlencoded
- json
raw ←
|
The serialization format of the body. When set to json or form-urlencoded , encodes the body argument, if needed, and automatically sets the Content-Type header accordingly. As of 2.3 it is possible to override the `Content-Type` header, when set to json or form-urlencoded via the headers option.
|
client_cert
(added in 2.4) |
|
PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, client_key is not required
|
client_key
(added in 2.4) |
|
PEM formatted file that contains your private key to be used for SSL client authentication. If client_cert contains both the certificate and key, this option is not required.
|
creates
|
|
A filename, when it already exists, this step will not be run.
|
dest
|
|
A path of where to download the file to (if desired). If dest is a directory, the basename of the file on the remote server will be used.
|
follow_redirects
|
|
Whether or not the URI module should follow redirects. all will follow all redirects. safe will follow only "safe" redirects, where "safe" means that the client is only doing a GET or HEAD on the URI to which it is being redirected. none will not follow any redirects. Note that yes and no choices are accepted for backwards compatibility, where yes is the equivalent of all and no is the equivalent of safe . yes and no are deprecated and will be removed in some future version of Ansible.
|
force_basic_auth
bool |
|
The library used by the uri module only sends authentication information when a webservice responds to an initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This option forces the sending of the Basic authentication header upon initial request.
|
HEADER_
|
|
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 2.1 and will be removed in Ansible-2.9. Use headers instead.
|
headers
(added in 2.1) |
|
Add custom HTTP headers to a request in the format of a YAML hash. As of 2.3 supplying Content-Type here will override the header generated by supplying json or form-urlencoded for body_format.
|
method
|
Choices:
GET ←
- POST
- PUT
- HEAD
- DELETE
- OPTIONS
- PATCH
- TRACE
- CONNECT
- REFRESH
|
The HTTP method of the request or response. It MUST be uppercase.
|
others
|
|
All arguments accepted by the file module also work here
|
password
|
|
A password for the module to use for Digest, Basic or WSSE authentication.
|
remote_src
bool
(added in 2.7) |
|
If no , the module will search for src on originating/master machine, if yes the module will use the src path on the remote/target machine.
|
removes
|
|
A filename, when it does not exist, this step will not be run.
|
return_content
bool |
|
Whether or not to return the body of the response as a "content" key in the dictionary result. If the reported Content-type is "application/json", then the JSON is additionally loaded into a key called json in the dictionary results.
|
src
(added in 2.7) |
|
Path to file to be submitted to the remote server. Cannot be used with body.
|
status_code
|
Default:
200
|
A list of valid, numeric, HTTP status codes that signifies success of the request.
|
timeout
|
Default:
30
|
The socket level timeout in seconds
|
url
required |
|
HTTP or HTTPS URL in the form (http|https)://host.domain[:port]/path
|
user
|
|
A username for the module to use for Digest, Basic or WSSE authentication.
|
validate_certs
bool
(added in 1.9.2) |
|
If no , SSL certificates will not be validated. This should only set to no used on personally controlled sites using self-signed certificates. Prior to 1.9.2 the code defaulted to no .
|