Parameter |
Choices/Defaults |
Comments |
checksum
string
|
|
If a checksum is passed to this parameter, the digest of the destination file will be calculated after it is downloaded to ensure its integrity and verify that the transfer completed successfully.
This option cannot be set with checksum_url.
|
checksum_algorithm
string
|
Choices:
- md5
sha1 ←
- sha256
- sha384
- sha512
|
Specifies the hashing algorithm used when calculating the checksum of the remote and destination file.
|
checksum_url
string
|
|
Specifies a URL that contains the checksum values for the resource at url.
Like checksum , this is used to verify the integrity of the remote transfer.
This option cannot be set with checksum.
|
client_cert
string
|
|
The path to the client certificate (.pfx) that is used for X509 authentication. This path can either be the path to the pfx on the filesystem or the PowerShell certificate path Cert:\CurrentUser\My\<thumbprint> .
The WinRM connection must be authenticated with CredSSP or become is used on the task if the certificate file is not password protected.
Other authentication types can set client_cert_password when the cert is password protected.
|
client_cert_password
string
|
|
The password for client_cert if the cert is password protected.
|
dest
path
/ required
|
|
The location to save the file at the URL.
Be sure to include a filename and extension as appropriate.
|
follow_redirects
string
|
|
Whether or the module should follow redirects.
all will follow all redirect.
none will not follow any redirect.
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.
When following a redirected URL, the Authorization header and any credentials set will be dropped and not redirected.
|
force
boolean
|
|
If yes , will download the file every time and replace the file if the contents change. If no , will only download the file if it does not exist or the remote file has been modified more recently than the local file.
This works by sending an http HEAD request to retrieve last modified time of the requested resource, so for this to work, the remote web server must support HEAD requests.
|
force_basic_auth
boolean
|
|
By default the authentication header is only sent when a webservice responses 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 the original request.
|
headers
dictionary
|
|
Extra headers to set on the request.
This should be a dictionary where the key is the header name and the value is the value for that header.
|
http_agent
string
|
Default:
"ansible-httpget"
|
Header to identify as, generally appears in web server logs.
This is set to the User-Agent header on a HTTP request.
|
maximum_redirection
integer
|
Default:
50
|
Specify how many times the module will redirect a connection to an alternative URI before the connection fails.
If set to 0 or follow_redirects is set to none , or safe when not doing a GET or HEAD it prevents all redirection.
|
proxy_password
string
|
|
The password for proxy_username.
|
proxy_url
string
|
|
An explicit proxy to use for the request.
By default, the request will use the IE defined proxy unless use_proxy is set to no .
|
proxy_use_default_credential
boolean
|
|
Uses the current user's credentials when authenticating with a proxy host protected with NTLM , Kerberos , or Negotiate authentication.
Proxies that use Basic auth will still require explicit credentials through the proxy_username and proxy_password options.
The module will only have access to the user's credentials if using become with a password, you are connecting with SSH using a password, or connecting with WinRM using CredSSP or Kerberos with delegation .
If not using become or a different auth method to the ones stated above, there will be no default credentials available and no proxy authentication will occur.
|
proxy_username
string
|
|
The username to use for proxy authentication.
|
url
string
/ required
|
|
The full URL of a file to download.
|
url_method
string
|
|
The HTTP Method of the request.
aliases: method
|
url_password
string
|
|
The password for url_username.
The alias password is deprecated and will be removed on the major release after 2022-07-01 .
aliases: password
|
url_timeout
integer
|
Default:
30
|
Specifies how long the request can be pending before it times out (in seconds).
Set to 0 to specify an infinite timeout.
aliases: timeout
|
url_username
string
|
|
The username to use for authentication.
The alias user and username is deprecated and will be removed on the major release after 2022-07-01 .
aliases: user, username
|
use_default_credential
boolean
|
|
Uses the current user's credentials when authenticating with a server protected with NTLM , Kerberos , or Negotiate authentication.
Sites that use Basic auth will still require explicit credentials through the url_username and url_password options.
The module will only have access to the user's credentials if using become with a password, you are connecting with SSH using a password, or connecting with WinRM using CredSSP or Kerberos with delegation .
If not using become or a different auth method to the ones stated above, there will be no default credentials available and no authentication will occur.
|
use_proxy
boolean
|
|
If no , it will not use the proxy defined in IE for the current user.
|
validate_certs
boolean
|
|
If no , SSL certificates will not be validated.
This should only be used on personally controlled sites using self-signed certificates.
|