Actually I've got a different problem this time. Jinja is complaining that 
variables are undefined. Can you see why the included template doesn't have 
access to the context?

{% block defs %}
{% for definition in definitions %}
      "test": "{% include 'sub/default.yml' with context %}",
{% endfor %}
{% endblock %}

And default.yml doesn't have access to suite or definition.suite:

suite={{definition.suite}}             // doesn't work for just {{ suite }} 
either - "definition" is undefined.

Thanks



On Monday, January 5, 2015 5:27:10 PM UTC, Mark wrote:
>
> Please can you point me to the relevant part of the docs (
> http://jinja.pocoo.org/docs/dev/templates/). I tried using the {% include 
> %} function and ansible returned an error saying that there was an error/it 
> wasn't allowed to call 'include'.
>
> Thanks
>
> On Monday, January 5, 2015 5:23:15 PM UTC, Brian Coca wrote:
>>
>> jinja2 also has reusable blocks, just for that case 
>>
>>
>>
>> -- 
>> Brian Coca 
>>
>

-- 
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/112e2819-5dfc-4066-9ccb-2b28b22b2d69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to