Hello everyone,
I'm trying to work with Jinja2 template inheritance and I'm seeing this issue.
#playbook.yml
---
- name: Template inheritance test
hosts: localhost
tasks:
- template:
src=child.j2
dest=~/test.cfg
#child.j2
{% extends "base.j2" %}
This is from the original
{% block my_block %}
{% endblock %}
This is from the original too
#base.j2
this should not be in the output.
{% block my_block %}
This should be in the output
{% endblock %}
this should not be in the output either.
After I run the playbook:
cat test.cfg
this should not be in the output.
this should not be in the output either.
I was expecting to see:
This is from the original
This should be in the output
This is from the original too
What I'm missing here?
Thanks.