We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module win_get_url does not respect content-disposition as the builtin module does.
ansible.windows.win_get_url
ansible [core 2.16.4] config file = /home/matteo/.ansible.cfg configured module search path = ['/home/matteo/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /opt/python-virtual-envs/ansible/lib/python3.10/site-packages/ansible ansible collection location = /home/matteo/.ansible/collections:/usr/share/ansible/collections executable location = /opt/python-virtual-envs/ansible/bin/ansible python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/opt/python-virtual-envs/ansible/bin/python3) jinja version = 3.1.3 libyaml = True
Collection Version --------------- ------- ansible.windows 2.2.0 # /opt/python-virtual-envs/ansible/lib/python3.10/site-packages/ansible_collections Collection Version --------------- ------- ansible.windows 2.2.0
CONFIG_FILE() = /home/matteo/.ansible.cfg EDITOR(env: EDITOR) = vim HOST_KEY_CHECKING(/home/matteo/.ansible.cfg) = False INVENTORY_ENABLED(/home/matteo/.ansible.cfg) = ['ini', 'yaml', 'community.general.lxd', 'community.vmware.vmware_vm_inventory', 'netbox.netbox.nb_inventory']
Ubuntu 22.04 LTS / PYthon 3.10
--- # LINUX (works as intended) - hosts: 172.16.8.56 gather_facts: true any_errors_fatal: true tasks: - name: Download the file ansible.builtin.get_url: url: https://dl.pstmn.io/download/latest/linux64 dest: "/tmp/" register: res - debug: var: res.dest # WINDOWS (This is the issue) - hosts: 172.16.11.33 gather_facts: true any_errors_fatal: true tasks: - name: Download the file ansible.windows.win_get_url: url: https://dl.pstmn.io/download/latest/linux64 dest: "C:\\temp\\" register: res - debug: var: res.dest ...
ok: [172.16.8.56] => { "res.dest": "/tmp/postman-linux-x64.tar.gz" }
TASK [debug] ************************************************************************************************************************************************************************************************************************** ok: [172.16.11.33] => { "res.dest": "C:\\temp\\linux64" }
Where the HTTP header Content-Disposition is taken:
$ curl -I https://dl.pstmn.io/download/latest/linux64 HTTP/2 200 content-length: 140108222 date: Tue, 05 Mar 2024 08:36:39 GMT last-modified: Tue, 05 Mar 2024 08:19:16 GMT etag: "1180f3f9f07dd2c9774b2f30494ae630-27" x-amz-server-side-encryption: AES256 accept-ranges: bytes server: AmazonS3 content-disposition: attachment; filename=postman-linux-x64.tar.gz cache-control: max-age=604800, s-maxage=604800 x-cache: Hit from cloudfront via: 1.1 a492d514787de63e7daf0f07b0c799fe.cloudfront.net (CloudFront) x-amz-cf-pop: MXP64-C1 x-amz-cf-id: yLWNHvlm4ngqOXD9QuBZNXNIKcTmWX--uydsSq8RW5QuJQ-9O5qLjQ== age: 105402
The text was updated successfully, but these errors were encountered:
Thanks for the issue, as this is a duplicate of #456 I am going to close this one.
Sorry, something went wrong.
No branches or pull requests
SUMMARY
Module win_get_url does not respect content-disposition as the builtin module does.
ISSUE TYPE
COMPONENT NAME
ansible.windows.win_get_url
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 22.04 LTS / PYthon 3.10
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
Where the HTTP header Content-Disposition is taken:
The text was updated successfully, but these errors were encountered: