Creating custom jinja filters

98 views
Skip to first unread message

Radosław Piliszek

unread,
Jun 10, 2022, 2:31:28 AM6/10/22
to Salt-users
Hello everyone,

I was wondering if Salt permits to create custom jinja filters.

I have come across the jinja_filter decorator [1] and tried applying it in my util module with no luck (it is not picked up, possibly by design).

The reason I need custom jinja filters is porting templates from Ansible. Switching to calling functions will be too tedious and make the diff considerably harder to read. Therefore, I wish to reimplement the necessary filters in my Salt hierarchy.


Kind regards,
Radosław Piliszek

Radosław Piliszek

unread,
Oct 10, 2022, 5:41:01 PM10/10/22
to Salt-users
It has been pointed out to me that it's most likely still not possible: https://saltstackcommunity.slack.com/archives/C7K04SEJC/p1624619929105800
Reply all
Reply to author
Forward
0 new messages