# \`from\_yaml\` seems to strips newlines from values in yaml strings

**URL:** <https://forum.ansible.com/t/from-yaml-seems-to-strips-newlines-from-values-in-yaml-strings/23749>\
**Category:** Ansible Project\
**Created:** [February 16, 2017, 8:26pm UTC](https://forum.ansible.com/t/from-yaml-seems-to-strips-newlines-from-values-in-yaml-strings/23749 "2017-02-16T20:26:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![james4](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@james4](https://forum.ansible.com/u/james4)\
**Post date:** [February 16, 2017, 8:26pm UTC](https://forum.ansible.com/t/from-yaml-seems-to-strips-newlines-from-values-in-yaml-strings/23749/1 "2017-02-16T20:26:23Z")

</div>

Name: "{{item.name}}"  
Platform: "{{item.platform}}"  
Attributes:  
&nbsp;&nbsp;PlatformCredential: "{{platform\_credential.stdout|regex\_replace('\n', '\\n')}}"  
&nbsp;&nbsp;PlatformPrincipal: "{{platform\_principal.stdout|regex\_replace('\n', '\\n')}}"

- debug:  
&nbsp;&nbsp;&nbsp;&nbsp;msg: "{{lookup('template', 'create-platform-application.yml.j2')|from\_yaml}}"

Any way to get around this without having to escape all values with possible newlines?
