-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
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
[2.0rc3] Fetch module cannot deal with multiline argument #13630
Comments
Having the same issue with the unarchive module. Ansible release 2.0.0.2 For example the following task:
Causes the following error:
Also noticed the error output from Ansible now contains literal "\n" characters that are not properly interpreted by the Mac terminal, so the error messages display the error text all jumbled together. |
@jimi-c I'm still having the same problem with ansible 2.0.1.0. Not sure why reports of this aren't widespread though, maybe few people are using this multi-line style? And don't know why unarchive in particular has this issue - I use the same multi-line style with many other modules with no problem. |
@jimi-c Some further info after digging a bit more:
Adding quotes makes it work:
|
@feliksik it looks like we fixed your issue here already, at least what I'm seeing in devel and stable-2.0. @edrozenberg the patch above appears to resolve your issue, just waiting for tests to pass to confirm it doesn't introduce any other bugs. |
Previously, split_args() was not taking print/block/comment depth into account when splitting things, meaning that if there was a quote character inside an un-quoted variable (ie. {{ foo | some_filter(' ') }}), it was incorrectly splitting on the quotes instead of continuing to append to the previous param. Fixes #13630
Merged the above into both devel and stable-2.0, so this will be included with 2.0.2. If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved. Thank you! |
Thank you. It works now. |
If I use
>
for multiline strings in the fetch module, this goes fine; according to yaml spec, the newlines are stripped.But with
^
it breaks (the yaml resulting string then contains\n
). The point is: this worked with Ansible 1.9. I think it was an explicit goal to be backwards compatible, so therefore I report it.outputs:
The text was updated successfully, but these errors were encountered: