Test Jinja Template locally

Hi,

I never did anything with Jinja before, now I want to create my first template. :slight_smile:

Is there an easy way to test my template locally?

Like on the command line with the variable as options?

i.e.
# jinja-test mytemplate.js special=yes proxy=foo

# cat mytemplate.js
proxy={{ proxy }}
{% if special=yes %}
   bla bla
{% endif %}

Marc

just use local_action: template, with the playbook and save it to a tmp dir, then you can examine it.

also --check and --diff do a good job of showing you what you would put into place with template module.