win_get_url – Downloads file from HTTP, HTTPS, or FTP to node¶
Synopsis¶
Downloads files from HTTP, HTTPS, or FTP to the remote server.
The remote server must have direct access to the remote resource.
For non-Windows targets, use the get_url module instead.
Parameters¶
Notes¶
Note
If your URL includes an escaped slash character (%2F) this module will convert it to a real slash. This is a result of the behaviour of the System.Uri class as described in the documentation.
Since Ansible 2.8, the module will skip reporting a change if the remote checksum is the same as the local local even when
force=yes
. This is to better align with get_url.
See Also¶
See also
- get_url – Downloads files from HTTP, HTTPS, or FTP to node
The official documentation on the get_url module.
- uri – Interacts with webservices
The official documentation on the uri module.
- win_uri – Interacts with webservices
The official documentation on the win_uri module.
- win_inet_proxy – Manages proxy settings for WinINet and Internet Explorer
The official documentation on the win_inet_proxy module.
Examples¶
- name: Download earthrise.jpg to specified path
win_get_url:
url: http://www.example.com/earthrise.jpg
dest: C:\Users\RandomUser\earthrise.jpg
- name: Download earthrise.jpg to specified path only if modified
win_get_url:
url: http://www.example.com/earthrise.jpg
dest: C:\Users\RandomUser\earthrise.jpg
force: no
- name: Download earthrise.jpg to specified path through a proxy server.
win_get_url:
url: http://www.example.com/earthrise.jpg
dest: C:\Users\RandomUser\earthrise.jpg
proxy_url: http://10.0.0.1:8080
proxy_username: username
proxy_password: password
- name: Download file from FTP with authentication
win_get_url:
url: ftp://server/file.txt
dest: '%TEMP%\ftp-file.txt'
url_username: ftp-user
url_password: ftp-password
- name: Download src with sha256 checksum url
win_get_url:
url: http://www.example.com/earthrise.jpg
dest: C:\temp\earthrise.jpg
checksum_url: http://www.example.com/sha256sum.txt
checksum_algorithm: sha256
force: True
- name: Download src with sha256 checksum url
win_get_url:
url: http://www.example.com/earthrise.jpg
dest: C:\temp\earthrise.jpg
checksum: a97e6837f60cec6da4491bab387296bbcd72bdba
checksum_algorithm: sha1
force: True
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is guaranteed to have backward compatible interface changes going forward. [stableinterface]
This module is maintained by the Ansible Core Team. [core]
Red Hat Support¶
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.
Authors¶
Paul Durivage (@angstwad)
Takeshi Kuramochi (@tksarah)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.