KeyError: 'module_blacklist'

60 views
Skip to first unread message

igor haase

unread,
Feb 18, 2022, 6:07:49 AM2/18/22
to Ansible Development
Hi there,

I am new in ansible started yesterday. I got the WARNING The plugin filter file, /etc/ansible/plugin_filters.yml does not exist
when I ran ansible --list-hosts ubuntu20
So I created that file like this:
---
filter_version: '1.0'
module_rejectlist:
  # Deprecated
  - docker
  # We only allow pip, not easy_install
  - easy_install

Now I get this error when I run the command above:

ERROR! Unexpected Exception, this is probably a bug: 'NoneType' object is not subscriptable
the full traceback was:

Traceback (most recent call last):
  File "/usr/bin/ansible", line 90, in <module>
    mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
  File "/usr/lib/python3.6/site-packages/ansible/cli/__init__.py", line 22, in <module>
    from ansible.inventory.manager import InventoryManager
  File "/usr/lib/python3.6/site-packages/ansible/inventory/manager.py", line 38, in <module>
    from ansible.plugins.loader import inventory_loader
  File "/usr/lib/python3.6/site-packages/ansible/plugins/loader.py", line 824, in <module>
    _PLUGIN_FILTERS = _load_plugin_filter()
  File "/usr/lib/python3.6/site-packages/ansible/plugins/loader.py", line 779, in _load_plugin_filter
    version = filter_data['filter_version']
TypeError: 'NoneType' object is not subscriptable
[uli@xxxxxx production]$ su
Password:
[root@xxxx production]# vim /etc/ansible/plugin_filters.yml
[root@xxxxxxx production]# exit
exit

ERROR! Unexpected Exception, this is probably a bug: 'module_blacklist'

What does this Message mean and how can I fix that. Google couldn't help me so far.

Many thanks in advance,

Igor

Brian Coca

unread,
Feb 21, 2022, 10:44:00 AM2/21/22
to igor haase, Ansible Development
you have `module_rejectlist`, but it requires `module_blacklist`




--
----------
Brian Coca

Reply all
Reply to author
Forward
0 new messages