jinja2-cli
jinja2-cli copied to clipboard
Ansible filters
Hi,
This adds support for Ansible filters (without importing each one manually like you would have to do with #86 ?).
This would also solve #91 and #85 (and my need to use the Ansible password_hash
filter).
Maybe you could look at it and tell me if there are things that need to be fixed?
Thanks
Filters in ansible always seem to be contained under the following structure: <base module>.plugins.filter.<*.py> > ModuleFilter.filters()
. So I reformatted the code to be more generic and added the ability to import filters from Ansible Collections (like ansible.utils
, ansible.netcommon
, community.general
, ...).
To use the basic filters you can use --ansible core
or --ansible <collection>
for any additionnal Ansible Collection (like --ansible community.general
for random_mac
filter for example).
What's up dude?
What's up dude?
Hey man, how's it going?