The ansible.windows.win_get_url module downloads files from HTTP, HTTPS, and FTP URLs to Windows remote hosts. It's the Windows equivalent of ansible.builtin.get_url — handles authentication, proxy settings, checksum validation, and TLS certificate handling.
- name: Download from internal server with self-signed cert
ansible.windows.win_get_url:
url: https://internal-server.local/package.zip
dest: C:\Temp\package.zip
validate_certs: false # Only for internal/dev servers
The request was aborted: Could not create SSL/TLS secure channel
TLS version mismatch
Update .NET / set TLS 1.2 via [Net.ServicePointManager]::SecurityProtocol
407 Proxy Authentication Required
Proxy needs credentials
Set proxy_username and proxy_password
404 Not Found
URL changed or wrong
Verify URL in browser
File always re-downloaded
No checksum set, force: true
Add checksum for idempotency
Access denied to dest path
Insufficient permissions
Run with become: true or use accessible path
Best Practices
Always use checksums — ensures integrity and idempotency
Use C:\Temp\ for downloads — clean up after installation
Set validate_certs: true in production — only disable for internal dev
Use vault for credentials — url_password, proxy_password
Set reasonable timeout — increase for large files or slow connections
Clean up installers — delete temp files after package installation
Conclusion
ansible.windows.win_get_url downloads files to Windows hosts from HTTP/HTTPS/FTP URLs. Always validate checksums for idempotent downloads. Handle corporate proxies with proxy_url and authentication parameters. Use force: true only when you need to re-download regardless of existing files. Pair with win_package for download-and-install workflows.