This is getting pretty weird.
I ran my ansible playbook with debug logging and found this at the top of the output:
ansible-playbook [core 2.13.3]
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.9/site-packages/ansible
ansible collection location = /etc/ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible-playbook
python version = 3.9.13 (main, Nov 8 2022, 17:21:43) [GCC 8.5.0 20210514 (Red Hat 8.5.0-15)]
jinja version = 3.1.2
libyaml = False
Using /usr/share/foreman-proxy/.ansible.cfg as config file
[DEPRECATION WARNING]: [defaults]callback_whitelist option, normalizing names
to new standard, use callbacks_enabled instead. This feature will be removed
from ansible-core in version 2.15. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
setting up inventory plugins
host_list declined parsing /tmp/d20221207-1196-589gnc/inventory/hosts as it did not pass its verify_file() method
Parsed /tmp/d20221207-1196-589gnc/inventory/hosts inventory source with script plugin
Loading callback plugin awx_display of type stdout, v2.0 from /usr/lib/python3.6/site-packages/ansible_runner/callbacks/awx_display.py
Loading collection theforeman.foreman from /usr/share/ansible/collections/ansible_collections/theforeman/foreman
Skipping callback 'awx_display', as we already have a stdout callback.
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
Loading callback plugin theforeman.foreman.foreman of type notification, v2.0 from /usr/share/ansible/collections/ansible_collections/theforeman/foreman/plugins/callback/foreman.py
[WARNING]: Callback disabled by environment. Disabling the Foreman callback
Checking the ansible config file /usr/share/foreman-proxy/.ansible.cfg, which seems to be maintained by Foreman:
callback_whitelist = theforeman.foreman.foreman
local_tmp = /tmp
host_key_checking = False
stdout_callback = yaml
roles_path = /etc/ansible/roles:/usr/share/ansible/roles
collections_paths = /etc/ansible/collections:/usr/share/ansible/collections
report_type = foreman
proxy_url = https://foreman.example.com:9090
url = https://foreman.example.com
ssl_cert = /etc/foreman-proxy/foreman_ssl_cert.pem
ssl_key = /etc/foreman-proxy/foreman_ssl_key.pem
verify_certs = /etc/foreman-proxy/foreman_ssl_ca.pem
ssh_args = -o ProxyCommand=none -C -o ControlMaster=auto -o ControlPersist=60s
seems to be fine, as the (even though deprecated) whitelist parameter is set and you can also see in the log above, the the plugin gets loaded.
According to this pull request on the callback plugin:
the ability was introduced for the callback plugin to be disabled on a case by case basis. For that it checks the environment variable FOREMAN_CALLBACK_DISABLE, which I cannot find set anywhere. The default of this should be 0, meaning activated.
But the warning message clearly indicates, that this environment variable was either set to 1 or the default check doesn’t work.
I am not sure where else I can search.