Parameter |
Choices/Defaults |
Comments |
attributes
string
|
|
The attributes the resulting file or directory should have.
To get supported flags look at the man page for chattr on the target system.
This string should contain the attributes in the same order as the one displayed by lsattr.
The = operator is assumed as default, otherwise + or - operators need to be included in the string.
aliases: attr
|
backup
boolean
|
|
Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.
|
checksum
string
|
Default:
""
|
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. Format: <algorithm>:<checksum|url>, e.g. checksum="sha256:D98291AC[...]B6DC7B97", checksum="sha256:http://example.com/path/sha256sum.txt"
If you worry about portability, only the sha1 algorithm is available on all platforms and python versions.
The third party hashlib library can be installed for access to additional algorithms.
Additionally, if a checksum is passed to this parameter, and the file exist under the dest location, the destination_checksum would be calculated, and if checksum equals destination_checksum, the file download would be skipped (unless force is true). If the checksum does not equal destination_checksum, the destination file is deleted.
|
client_cert
path
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
path
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.
|
dest
path
/ required
|
|
Absolute path of where to download the file to.
If dest is a directory, either the server provided filename or, if none provided, the base name of the URL on the remote server will be used. If a directory, force has no effect.
If dest is a directory, the file will always be downloaded (regardless of the force option), but replaced only if the contents changed..
|
force
boolean
|
|
If yes and dest is not a directory, will download the file every time and replace the file if the contents change. If no , the file will only be downloaded if the destination does not exist. Generally should be yes only for small local files.
Prior to 0.6, this module behaved as if yes was the default.
Alias thirsty has been deprecated and will be removed in 2.13.
aliases: thirsty
|
force_basic_auth
boolean
|
|
Force the sending of the Basic authentication header upon initial request.
httplib2, 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.
|
group
string
|
|
Name of the group that should own the file/directory, as would be fed to chown.
|
headers
raw
|
|
Add custom HTTP headers to a request in hash/dict format.
The hash/dict format was added in Ansible 2.6.
Previous versions used a "key:value,key:value" string format.
The "key:value,key:value" string format is deprecated and will be removed in version 2.10.
|
http_agent
string
|
Default:
"ansible-httpget"
|
Header to identify as, generally appears in web server logs.
|
mode
string
|
|
The permissions the resulting file or directory should have.
For those used to /usr/bin/chmod remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like 0644 or 01777 ) or quote it (like '644' or '1777' ) so Ansible receives a string and can do its own conversion from string into number.
Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results.
As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, u+rwx or u=rw,g=r,o=r ).
As of Ansible 2.6, the mode may also be the special string preserve .
When set to preserve the file will be given the same permissions as the source file.
|
owner
string
|
|
Name of the user that should own the file/directory, as would be fed to chown.
|
selevel
string
|
Default:
"s0"
|
The level part of the SELinux file context.
This is the MLS/MCS attribute, sometimes known as the range .
When set to _default , it will use the level portion of the policy if available.
|
serole
string
|
|
The role part of the SELinux file context.
When set to _default , it will use the role portion of the policy if available.
|
setype
string
|
|
The type part of the SELinux file context.
When set to _default , it will use the type portion of the policy if available.
|
seuser
string
|
|
The user part of the SELinux file context.
By default it uses the system policy, where applicable.
When set to _default , it will use the user portion of the policy if available.
|
sha256sum
-
|
Default:
""
|
If a SHA-256 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 is deprecated. Use checksum instead.
|
timeout
integer
|
Default:
10
|
Timeout in seconds for URL request.
|
tmp_dest
path
|
|
Absolute path of where temporary file is downloaded to.
When run on Ansible 2.5 or greater, path defaults to ansible's remote_tmp setting
When run on Ansible prior to 2.5, it defaults to TMPDIR , TEMP or TMP env variables or a platform specific value.
|
unsafe_writes
boolean
|
|
Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file.
By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner.
This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes).
IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption.
|
url
string
/ required
|
|
HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
|
url_password
string
|
|
The password for use in HTTP basic authentication.
If the url_username parameter is not specified, the url_password parameter will not be used.
Since version 2.8 you can also use the 'password' alias for this option.
aliases: password
|
url_username
string
|
|
The username for use in HTTP basic authentication.
This parameter can be used without url_password for sites that allow empty passwords.
Since version 2.8 you can also use the username alias for this option.
aliases: username
|
use_proxy
boolean
|
|
if no , it will not use a proxy, even if one is defined in an environment variable on the target hosts.
|
validate_certs
boolean
|
|
If no , SSL certificates will not be validated.
This should only be used on personally controlled sites using self-signed certificates.
|