Skip to content
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

multiline modules issue with "|" and ">" and newline preservation #8394

Closed
bcoca opened this issue Aug 1, 2014 · 3 comments
Closed

multiline modules issue with "|" and ">" and newline preservation #8394

bcoca opened this issue Aug 1, 2014 · 3 comments
Labels
bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release

Comments

@bcoca
Copy link
Member

bcoca commented Aug 1, 2014

Issue Type:

Bug Report

Ansible Version:

ansible 1.7 (devel c93b89f)

Environment:

Ubuntu 12.04, 14.04

Summary:

Previously working multiline tasks stopped working

Steps To Reproduce:

In a play:

    - name: Set timezone variables
      copy: |
            content='America/New_York
            '
            dest=/tmp/timezone
Expected Results:

timezone file gets updated

Actual Results:
failed: [localhost] => {"failed": true}                                                                                                                                    
msg: src (or content) and dest are required                                                                                                                                

FATAL: all hosts have already failed -- Aborting                                                                                                                                                                                     

changing the | to a > makes it work again, but this code had been working for a looong time (I'll run bisect when i have time to see what caused the issue)

@mpdehaan
Copy link
Contributor

mpdehaan commented Aug 2, 2014

Thanks for the report.

Please don't bother with the bisect, various parser changes have been required for security fixes. It seems the ">" is the proper answer but we can explore this one.

@mpdehaan mpdehaan changed the title multiline modules issues multiline modules issue with "|" and ">" and newline preservation Aug 2, 2014
@jimi-c jimi-c closed this as completed in af0d8cd Aug 4, 2014
@jimi-c
Copy link
Member

jimi-c commented Aug 4, 2014

I've pushed the above commit, which should resolve this issue. If you continue seeing any problems related to this issue, please let us know. Thanks!

@bcoca
Copy link
Member Author

bcoca commented Aug 4, 2014

tested with play that initially gave me issues, all works! thanks!

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release
Projects
None yet
Development

No branches or pull requests

4 participants