Filter plugins wont be loaded

schuert
Tue, 13 Jan 2026 15:09:20 +0000
Get Help

Hi Guiys,

I have Problems with self written filter_plugins that worked flawlessly in the past.

I’m executing ansible playbooks via gitlab-runner in our infrastructure. In the past we used a runner of type shell. Some roles use additional filter plugins that are provided via rolename/filter_plugins/myfilter.py which worked as intended with ansible 2.17.

At the moment I’m implementing a new runner that uses docker container with ansible 2.20 which works the same but uses a different folder structure and a newer ansible version. The playbooks and roles didn’t change.

Structur:
pwd = playbookdir
playbookdir/playbook.yml
playbookdir/roles/testrole
playbookdir/roles/testrole/filter_plugins

when executing the playbook the task that uses a filter_plugin from testrole/filter_plugins/myfilter.py wont load the plugin and errors out.

Even setting ANSIBLE_FILTER_PLUGINS to the directory or copying the plugin to /usr/lib/python3/dist…/plugins/filter doesn’t work. Setting ANSIBLE_DEBUG=1 I see that ansible doesn’t even attempt to load the plugin.

Any Ideas why this doesn’t work any longer? Does anything regarding filter plugins changed in versions > 2.17?

All help is appreciated.

Kind Regards
schuert

5 posts - 3 participants