Hi, ladies and gentlemen. I'm trying to setup Foreman with Ansible. Looks like I'm missing something. After the test command on the Ansible server "ansible -m setup localhost" Ansible writes many green strings with configuration info, and in the end where the Callback should be used it says:
*[WARNING]: Failure using method (v2_runner_on_ok) in callback plugin (</usr/share/ansible/plugins/callback/foreman_callback.CallbackModule object at 0x16995d0>):* *HTTPSConnectionPool(host='myAWShost.myRegion.compute.internal', port=3000): Max retries exceeded with url: /api/v2/hosts/facts (Caused by <class* *'socket.error'>: [Errno 111] Connection refused)* I did everything as in the manual, may be I have ony changed the default directory of a plugin (*/usr/share/ansible/plugins/*), but i made appropriate changes to Ansible config, as plugin itself works. In the Foreman UI I see some options appeared related to Ansible, like "Configure -> Ansible / Roles". Also I added my Ansible server to the *trusted_puppetmaster_hosts* and *create_new_host_when_facts_are_uploaded* are ON. The problem is, as I see, in connection to Foreman. In my Foreman Callback .py file *FOREMAN_URL *is the same, as it is in the results of the following command *openssl s_client -showcerts -connect myAWShost.myRegion.compute.internal:443* This same address was by default. Also I copied Foreman's cert .pem and ssl .pem to the Ansible server and added this paths in the *foreman_callback.py* file. When I try to turn off *FOREMAN_SSL_VERIFY*, I'm getting another error: *ERROR! Unexpected Exception: 'module' object has no attribute 'packages'* *the full traceback was:* *Traceback (most recent call last):* * File "/usr/bin/ansible", line 92, in <module>* * exit_code = cli.run()* * File "/usr/lib/python2.6/site-packages/ansible/cli/adhoc.py", line 193, in run* * result = self._tqm.run(play)* * File "/usr/lib/python2.6/site-packages/ansible/executor/task_queue_manager.py", line 202, in run* * self.load_callbacks()* * File "/usr/lib/python2.6/site-packages/ansible/executor/task_queue_manager.py", line 188, in load_callbacks* * self._callback_plugins.append(callback_plugin())* * File "/usr/share/ansible/plugins/callback/foreman_callback.py", line 69, in __init__* * self.ssl_verify = self._ssl_verify()* * File "/usr/share/ansible/plugins/callback/foreman_callback.py", line 83, in _ssl_verify* * requests.packages.urllib3.disable_warnings()* *AttributeError: 'module' object has no attribute 'packages'* Need help, what have I done wrong? May be something wrong with the installation, don't know... -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
