# Whitespace in multi-line variables on ansible 2.x

**URL:** <https://forum.ansible.com/t/whitespace-in-multi-line-variables-on-ansible-2-x/20274>\
**Category:** Ansible Project\
**Created:** [January 19, 2016, 3:23pm UTC](https://forum.ansible.com/t/whitespace-in-multi-line-variables-on-ansible-2-x/20274 "2016-01-19T15:23:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Martin](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Andrew\_Martin](https://forum.ansible.com/u/Andrew_Martin)\
**Post date:** [January 19, 2016, 3:23pm UTC](https://forum.ansible.com/t/whitespace-in-multi-line-variables-on-ansible-2-x/20274/1 "2016-01-19T15:23:30Z")

</div>

Hello,

When creating multi-line variables, I would often use the following technique to insert tabs in ansible 1.x:

```auto
myvar: |
 {{'\t'}}one
 {{'\t'}}two
 {{'\t'}}three

```

This would result in the 3 lines being indented by a tab character in the resulting file. However this does not seem to work in ansible 2.x - the literal `\t` characters get written to the file rather than expanded to a tab.

If I try to directly insert tab characters in the variable itself, I get a YAML syntax error due to the extra indentation on the line right after the variable name:

```auto
myvar: |
     one
     two
     three

```

What does appear to work is to add an empty character on the beginning of that first line, and then follow it with the tab:

```auto

myvar: |
 {{''}} one
     two
     three

```

This works but distorts the formatting of the variable and is hard to read. How can I correctly denote tab characters in multi-line variables in ansible 2.x?

Thanks,

Andrew
