Every job in foreman ansible returns ERROR! Unexpected Exception, this is probably a bug: ‘NoneType’ object has no attribute 'set_options’
Executing the same template locally with ansible-playbook echo.yaml -i localhost,
completes successfully so this seems to be a foreman configuration issue.
This is Foreman 3.1 on Ubuntu 20.04
Job log:
ansible-playbook 2.9.6
config file = /usr/share/foreman-proxy/.ansible.cfg
configured module search path = ['/usr/share/foreman-proxy/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]
Using /usr/share/foreman-proxy/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /tmp/d20220125-688-fjw2ek/inventory/hosts as it did not pass its verify_file() method
Parsed /tmp/d20220125-688-fjw2ek/inventory/hosts inventory source with script plugin
Loading callback plugin awx_display of type stdout, v2.0 from /usr/lib/python3/dist-packages/ansible_runner/callbacks/awx_display.py
ERROR! Unexpected Exception, this is probably a bug: 'NoneType' object has no attribute 'set_options'
the full traceback was:
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 123, in <module>
exit_code = cli.run()
File "/usr/lib/python3/dist-packages/ansible/cli/playbook.py", line 127, in run
results = pbex.run()
File "/usr/lib/python3/dist-packages/ansible/executor/playbook_executor.py", line 99, in run
self._tqm.load_callbacks()
File "/usr/lib/python3/dist-packages/ansible/executor/task_queue_manager.py", line 164, in load_callbacks
callback_obj.set_options()
AttributeError: 'NoneType' object has no attribute 'set_options'
Exit status: 250
Job template:
---
- hosts: all
tasks:
- shell:
cmd: |
echo foo
register: out
- debug: var=out