Closed frittentheke closed 5 years ago
Thanks for raising this, wanted to add more jinja2 filters for a while, the ansible filters are a good starting point.
@frittentheke if you want to experiment with the new jinja2 filters we've just made a release candidate https://pypi.org/project/kapitan/0.23.0rc1/
Feature Request
Currently Kapitan does support the core Jinja2 filters to which a handful of filters are added (https://github.com/deepmind/kapitan/blob/918e905a7ccf386226a697e8f2adcad0d1cec3ee/README.md#jinja2-custom-filters).
While the filters Kapitan delivers out of the box are all very helpful, sometimes more string modifications are required on the inventory items to use them efficiently in Jinaj2 templated files.
Expected behavior Either allow to add filters as source, just like i.e. Ansible does (filter_plugins dir) or simply add some of "their" already battle proven Jinja2 filters - https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/filter
Most of those, i.e. regex_replace, are so versatile they would greatly improve the templating capabilities of Kapitan.