-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fetch Silently Fails To Fetch File #3375
Comments
@slimandslam Aha- took me a bit to figure this out. Assuming your dest is a dir, you need a trailing slash on it. Linux fetch will fail explicitly in this case (sans-trailing-slash will tell you it's a dir, with trailing slash will do what you expect). The Windows fetch is failing to error on the sans-trailing-slash case, and just downloading the file to nowhere. The real clue is the null checksum after fetch has completed. I'll keep this open until we fix the underlying issue (erroring like Linux does). Thanks for the report! |
Turns out this issue isn't Windows-specific. Anything but connection=local that uses the fetch action will fail this way (the failure is on the Ansible controller side). |
The destination is always a directory according to the fetch documentation. |
It's actually both a docs bug and an implementation bug. When using flat=yes, it can be either a file or a dir, and the behavior can differ based on the connection plugin (but probably shouldn't). All I tested seem to work with a trailing slash, but Local throws an error if you give it a dir without a trailing slash, winrm and ssh will fail in the way you've noted. |
@ansible, ping. This issue is still waiting on your response. |
@ansible, ping. This issue is still waiting on your response. |
@ansible, ping. This issue is still waiting on your response. |
2 similar comments
@ansible, ping. This issue is still waiting on your response. |
@ansible, ping. This issue is still waiting on your response. |
@ansible, ping. This issue is still waiting on your response. |
This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo. |
ISSUE TYPE
COMPONENT NAME
fetch module
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Running from Amazon Linux 2016.03 release
Target is Windows Server 2012 R2 (recent patches applied)
SUMMARY
Fetching an 80mbyte file from Windows Server silently fails. Ansible does not report an error, but the file never arrives. (Fetching the same file from a remote Linux server works fine, btw)
STEPS TO REPRODUCE
EXPECTED RESULTS
I expect the file to be placed on the control machine.
ACTUAL RESULTS
The file never arrives but the results don't indicate a problem (afaict).
The text was updated successfully, but these errors were encountered: