Failure using method (v2_runner_on_ok) in callback plugin

Problem:
When i execute

 ansible -m setup localhost

I get this error:

 [WARNING]: Failure using method (v2_runner_on_ok) in callback plugin (</usr/lib/python2.7/dist-
packages/ansible/plugins/callback/foreman.CallbackModule object at 0x7f83133ca450>): HTTPConnectionPool(host='localhost',
port=3000): Max retries exceeded with url: /api/v2/hosts/facts (Caused by
NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f8317189550>: Failed to establish a new
connection: [Errno 111] Connection refused',))

Expected outcome:
Just the facts.

Foreman and Proxy versions:
foreman & proxy 1.19.0-1

Foreman and Proxy plugin versions:
ruby-foreman-ansible 2.2.9-1
ansible 2.2.1.0-2

Nice two know

When i installed the ansible plugin, i had the following problem:

Maybe thats the cause of everything? I didn’t find a other fix.

Regards

My mistake. I set the environment variables wrong.
On the Client i get this error while executing the ansible setup command:

[WARNING]: The `requests` python module is not installed. Disabling the Foreman callback plugin.

The error says it all, please install requests module.

For example with pip install requests

1 Like

Oh wow, your welcome