On Saturday, 13 October 2018 18.37.22 CEST Dmitriy Panteleyev wrote:
> I've been banging my head against this for two days.  Maybe I'm missing 
> something.  When fetching a YAML file or template with lookup function, all 
> the newlines are not preserved, but converted to '\n'.

They are not converted, this is just how the default callback plugin chooses to 
show the content in the debug module.


> This does not 
> happen for other file types (like json).  Is this the expected behavior?

Yes


> Is there a way around it?

Ansible is not a reporting tool, so if that is what you are looking for you 
probably need some other tool.
That being said you have many callback plugins to choose[1] and if non of them 
suites your need to can always create you own.
 

[1] https://docs.ansible.com/ansible/2.7/plugins/callback.html#plugin-list

-- 
Kai Stian Olstad


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2542385.SYnOA5c5cv%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to