Forgot to add: ansible version 2.14.3, jinja2 version 2.10.1

On Wednesday, July 3, 2024 at 2:58:31 AM UTC+3 dutu.a...@gmail.com wrote:

> Hello,
>
> I have a j2 template that looks like this:
>
> ---
> text text
> {% block filter %}{% endblock %}
> ---
>
> and a child template that extends it:
> ---
> {% extends 'parent.j2' %}
> {% block filter %} add filter here {% endblock %}
>
> Now in another template I have this:
>
> {{ lookup ('template', template_name) }}
> and i have some ifs to set the template name either to the parent or the 
> child.
>
> Now here comes the really weird part. If I use the child template here, 
> everything works well. If i use the parent I get this error:
>
> unsupported operand type(s) for +=: 'dict' and 'str' 
>
> How can it render the child which also contains the parent but not the 
> parent? I've been trying to fix this for days but nothing works. The error 
> message is very weird as well, I have no idea where the issue is. Seems 
> like maybe something in the python code.
>
> Thanks!
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/819f3b1c-730d-4ff5-8a6c-ba920a4e3a4bn%40googlegroups.com.

Reply via email to