fetch fails on Windows filenames containing dollar sign #62781
Labels
affects_2.7
This issue/PR affects Ansible v2.7
bug
This issue/PR relates to a bug.
files
Files category
module
This issue/PR relates to a module.
python3
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
traceback
This issue/PR includes a traceback.
windows
Windows community
SUMMARY
fetch
module fails on Windows with file names containing dollar signs (winrm FETCH does not quote these from PowerShell). When using|quote
or backslash-escaping the dollars, slurp, which is executed by fetch, does handle such paths correctly and therefore fails on pre-quoted ones.ISSUE TYPE
COMPONENT NAME
fetch
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
Create a file such as
C:\Temp\file_with_$dollar.txt
EXPECTED RESULTS
File gets copied from Windows remote to localhost.
ACTUAL RESULTS
When replacing
src: "{{ item }}"
withsrc: "{{ item|quote }}"
:When replacing
src: "{{ item }}"
withsrc: "{{ item|replace('$', '\\$') }}"
:WORKAROUND
The text was updated successfully, but these errors were encountered: