# empty line where conditional line exist

**URL:** <https://forum.ansible.com/t/empty-line-where-conditional-line-exist/19586>\
**Category:** Ansible Project\
**Created:** [October 22, 2015, 12:58am UTC](https://forum.ansible.com/t/empty-line-where-conditional-line-exist/19586 "2015-10-22T00:58:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_Muriithi](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@William\_Muriithi](https://forum.ansible.com/u/William_Muriithi)\
**Post date:** [October 22, 2015, 12:58am UTC](https://forum.ansible.com/t/empty-line-where-conditional-line-exist/19586/1 "2015-10-22T00:58:34Z")

</div>

Evening,

Is there a way to avoid an empty line in the configuration file when template has conditional lines?

I have always ignored the empty line but logstash-forwarder use a json bases configuration and the empty line is problematic.

Regards,

William

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [October 22, 2015, 1:22am UTC](https://forum.ansible.com/t/empty-line-where-conditional-line-exist/19586/2 "2015-10-22T01:22:00Z")

</div>

Checkout the white space control docs on the jinja2 website:

[http://jinja.pocoo.org/docs/dev/templates/#whitespace-control](http://jinja.pocoo.org/docs/dev/templates/#whitespace-control)

Specifically for things like {%- And -%}
