layers:
- name: APP
things:
- cactus
- lotus
- jasmine
- rose
- name: WAS
things:
- mango
- apple
{% for layer in layers %}
<table>
<tr>
<th> </th>
{% for item in layer.things %}
<th align="center">{{ item }}</th>
{% endfor %}
</tr>
</table>
{% endfor %}
{% if {{ playbook_dir }}/{{ item }}/bad*.txt | exists %}
<th align="center">{{ item }}</th>
{% else %}
<th align="left">{{ item }}</th>
{% endif %}
TASK [Create the Jinja2 based template] *********************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleError: template error while templating string: expected token ':', got '}'. String: {% for layer in layers %}\n........
Hi,
Your error is about a for loop, but your template included in your email doesn't have this loop.
Looks like you didn't give us the good one
Regards,
JYL
--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e2c31593-0389-4c5d-9bbb-9f29e528a832%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/44bc6389-53a2-31d9-62a4-25897191e902%40lenhof.eu.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/44bc6389-53a2-31d9-62a4-25897191e902%40lenhof.eu.org.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/e2c31593-0389-4c5d-9bbb-9f29e528a832%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/e2c31593-0389-4c5d-9bbb-9f29e528a832%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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
{% if playbook_dir + '/' + item + '/' + 'bad*.txt' | exists %}
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a7f0c40f-a98e-58e2-c659-c10b283bddf0%40linuxia.de.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e4ad4ca8-36e5-902d-ebed-c46cff77b0e3%40linuxia.de.