# Tabulator in jinja2 template?

**URL:** <https://forum.ansible.com/t/tabulator-in-jinja2-template/23558>\
**Category:** Ansible Project\
**Created:** [January 25, 2017, 3:39pm UTC](https://forum.ansible.com/t/tabulator-in-jinja2-template/23558 "2017-01-25T15:39:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [January 25, 2017, 3:39pm UTC](https://forum.ansible.com/t/tabulator-in-jinja2-template/23558/1 "2017-01-25T15:39:52Z")

</div>

Dear all,

is there a way to add a tabulator to a template in ansible? I mean  
without actually using a tabulator, so it would be easier to spot  
while checking the template.

The lineinfile module supports {{\t}}, but that throws errors in my  
tests. I also find nothing on the web, but maybe I'm lacking the right  
search terms...

Thanks in advance,  
Johannes

---

<div class="post-metadata">

**Author:** ![azaghal](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/azaghal/32/4743_2.png) [@azaghal](https://forum.ansible.com/u/azaghal)\
**Post date:** [January 25, 2017, 3:52pm UTC](https://forum.ansible.com/t/tabulator-in-jinja2-template/23558/2 "2017-01-25T15:52:37Z")

</div>

Try putting quotes around \t, i.e. {{ "\t" }}.

It does look a bit too verbose to me, though. You could use cat -A  
instead to see things like tabs in a file instead.

Best regards

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [January 26, 2017, 4:50pm UTC](https://forum.ansible.com/t/tabulator-in-jinja2-template/23558/3 "2017-01-26T16:50:58Z")

</div>

> Try putting quotes around \t, i.e. {{ "\t" }}.

Thanks, that works. Inconsistent, but it works.

> It does look a bit too verbose to me, though. You could use cat -A  
> instead to see things like tabs in a file instead.

I agree it makes things harder to read, but in this case I guess it is  
worth the trouble...

Thanks!

Johannes
