CLI tool for rendering Jinja2 templates (with Ansible filters and tests)

This is partially Ansible related, but since Ansible users learn how to use Jinja2 templates and want to use them for everything, even outside of Ansible…

After a social media post from @jpmens inspired me, I created Jinjanator, which is a CLI tool for rendering Jinja2 templates using JSON, YAML, or INI input. While there were some existing similar tools already, none of them supported plugins and thus it would have been difficult to make them support Ansible’s suite of template filters and tests.

The Ansible plugin provides those filters and tests from the ansible-core package, and there are also plugins for XML and TOML input, should those be useful to you.

I hope this is useful for you; if you find any problems or have feature requests, feel free to open issues in the repositories linked from those PyPI pages!


Thanks @kpfleming! This a great example of the sort of thing that exists in Ansible’s orbit whilst remaining separate from it. Sharing this kind of project needs a better home than Social Space, I need to.think about that.

I also wonder if @KeyboardInterrupt might want to add it to the awesome-ansible list?


I almost mentioned it near the end of your talk today when you asked about ‘contribution stories’ but it seemed a bit too far outside of Ansible itself… and then I realized I hadn’t posted it here :slight_smile: