The Foreman callback plug-in is saying that requests is not installed therefore no systems are getting updated/registered via Ansible.
Foreman callback plug-in to update hosts information via Ansible.
Foreman and Proxy versions:
Foreman and Proxy plugin versions:
Distribution and version:
Centos 8 stream
Other relevant information:
python3-requests RPM is installed from upstream, removing that and substituting with python3 -m pip installed requests did not change the outcome.
March 15, 2022, 8:04am
Try installing python38-requests please, if you’re running with ansible-core 2.12 from CentOS 8 Stream
That worked I also had to point to the puppet certificates for the callback to work a 100%
callback_whitelist = foreman
url = 'https://foreman.example.com'
ssl_cert = /etc/puppetlabs/puppet/ssl/certs/foreman.example.com.pem
ssl_key = /etc/puppetlabs/puppet/ssl/private_keys/foreman.example.com.pem
verify_certs = /etc/puppetlabs/puppet/ssl/certs/ca.pem
March 15, 2022, 12:25pm
How did the config look before that? The installer
should setup all certs correctly.
I’ve proposed changes that should pull in the right requests to packaging in
adjust dependencies to pull in right requests and pyyaml by evgeni · Pull Request #7714 · theforeman/foreman-packaging · GitHub
It had nothing other then the comments, I added the defaults and callback section manuly
# Since Ansible 2.12 (core):
# To generate an example config file (a "disabled" one with all default settings, commented out):
# $ ansible-config init --disabled > ansible.cfg
# Also you can now have a more complete file by including existing plugins:
# ansible-config init --disabled -t all > ansible.cfg
# For previous versions of Ansible you can check for examples in the 'stable' branches of each version
# Note that this file was always incomplete and lagging changes to configuration settings
# for example, for 2.9: https://github.com/ansible/ansible/blob/stable-2.9/examples/ansible.cfg
March 15, 2022, 12:34pm
Wait, is this
/etc/ansible/ansible.cfg as used by Ansible itself or
/etc/foreman-proxy/ansible.cfg as used by the Foreman integration?
Ahh I see, I was a bit confused based on the documentation
Ansiblecallback it made it seem that
/etc/ansible/ansible.cfg was still the main file that the configs needed to be in.
March 15, 2022, 12:48pm
On the one hand, I think the docs are a tad outdated (cc
On the other there are two major ways of using the callback:
via the Foreman Ansible integration, which is setup automatically for you if you’re using the installer and uses
manually from essentially any system that can run Ansible (and thus reads
In most cases, users want the former. The later is relevant if you have a separate environment to run Ansible from (AWX, Rundeck, whatever) and still want the reports be available in Foreman.