>
>
> Just a guess:
> Your problem is not the default, but rather how you try to address
> your dict.
>
> Try this:
> pgservice: {{ instance["msgservices"]["name"] }}
>
> Johannes
>
Thanks but I have the same error. I want to use default_mgservice.name
when mgservices is not defined.
I find this workarround :
{% if instance.mgservices is defined %}
pgservice : {{ instance.mgservices.name | default(default_mgservice.name) }}
{% else %}
pgservice : {{ default_mgservice.name }}
{% endif %}
--
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/80eebf26-9ddf-4492-9226-5726d855a033%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.