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.
On Wed, Aug 19, 2015 at 12:18 PM, <[email protected]> wrote:
>
> 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?
>
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/6c75d48e-cad4-4172-8492-7ca23ca1171d%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/6c75d48e-cad4-4172-8492-7ca23ca1171d%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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAD8N0v-ogixipBsEKan593rv2AVt1i_J4KwZyHUNReMcY9onwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.