# using default(omit) in a template

**URL:** <https://forum.ansible.com/t/using-default-omit-in-a-template/19059>\
**Category:** Ansible Project\
**Created:** [August 19, 2015, 5:18pm UTC](https://forum.ansible.com/t/using-default-omit-in-a-template/19059 "2015-08-19T17:18:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tahonezz](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@tahonezz](https://forum.ansible.com/u/tahonezz)\
**Post date:** [August 19, 2015, 5:18pm UTC](https://forum.ansible.com/t/using-default-omit-in-a-template/19059/1 "2015-08-19T17:18:01Z")

</div>

I am trying to use the following in a template

var = {{ param | default(omit) }}

when the template copied to the host , it looks like this

var = \_\_omit\_place\_holder\_\_ced80263bbdf6fd69a66240ad5188ab4727dd7ad

instead of what i was hoping to get which was

#var =

any ideas on how to achieve this properly?

---

<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:** [August 19, 2015, 5:20pm UTC](https://forum.ansible.com/t/using-default-omit-in-a-template/19059/2 "2015-08-19T17:20:03Z")

</div>

Something like:

{% if param|default(‘MISSING’) != ‘MISSING’ %}  
var = {{ missing }}  
{% else %}  
#var =  
{% endif %}

There are probably other options as well, but this is largely what I use and what I see elsewhere.
