2019年2月19日星期二

A handy way of debugging Jinja2 templates

Came across this today. Instead of assembling a whole Ansible playbook and role structure to test out a Jinja2 template, you can just import the jinja2 module in the Python interactive interpreter and do your test. You don't even have to worry about installing the jinja2 module. You can run Ansible playbooks with template modules so it's already there, right?

Credit goes to this nice blog post - https://overiq.com/flask-101/basics-of-jinja-template-language/.