Use the |trim jinja2 filter to strip whitespace off of the ends.

On Fri, May 8, 2015 at 4:55 PM, John Oliver <jno...@gmail.com> wrote:

> ansible 1.9.0.1
>
>   - name: Get java version
>     script: /tmp/javaver.sh
>     register: java_ver
>
>   - name: Touch test file
>     copy: dest="/tmp/{{ java_ver.stdout }}"
>           content="test"
>
> TASK: [Show output from installer]
> ********************************************
> ok: [flamingo] => {
>     "msg": "1.8.0_45\n"
> }
>
> joliver@flamingo U_JRE7_UNIX_V1R4_prep $ ls -l /tmp/
> total 32
> -rw-r--r--  1 joliver     staff     4 May  8 14:45 1.8.0_45?
>
> Adding '_lines' get a file called:
>
> ['1.8.0_45']
>
> How do I have ansible not try to interpret the newline?
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/8949ea26-28c8-4eeb-b9cd-7d9c7748cc2b%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/8949ea26-28c8-4eeb-b9cd-7d9c7748cc2b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v_Vujco8SxpmL%3D1VBK0_HBmOpH6g9t4-aAaXHFvSc-4_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to