Foreman 1.18.0 Ansible Facts not visible in Dashboard

Problem:
Followed URL Foreman :: Plugin Manuals for New installation. Installed ansible plugin and visible in setting. when running ansible -m setup localhost. it should add facts to foreman as new host.

Foreman and Ansible is on the same host.

Expected outcome:
Facts should be visible as per above URL

Foreman and Proxy versions:

Foreman and Proxy plugin versions:
foreman_ansible : 2.2.5
katello : 3.7.0
foreman: 1.18.0

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]

I think you need to run playbook, not just setup module.

Hope this helps

Thank you for reply Marek!

Tried with ansible short task but, no luck. could not see any logs in production.log as well.

While running ansible task, production.log showing below api call.

[root@xxx-xxxxx foreman]# tail -f production.log | grep -i ‘xxx-xxxxx.xxx.xxx.xxxx.com

2018-08-06T20:14:57 [I|app|3850e] Parameters: {“facts”=>"[FILTERED]", “name”=>“xxx-xxxxx.xxx.xxx.xxxx.com”, “apiv”=>“v2”, “host”=>{“name”=>“xxx-xxxxx.xxx.xxx.xxxx.com”}}
2018-08-06T20:14:59 [I|app|3850e] Import facts for ‘xxx-xxxxx.xxx.xxx.xxxx.com’ completed. Added: 0, Updated: 19, Deleted 0 facts
2018-08-06T20:15:00 [I|app|098e0] Imported report for xxx-xxxxx.xxx.xxx.xxxx.com in 0.05 seconds, status refreshed in 0.02 seconds

but, still dashboard is empty.

Interesting, production log looks fine. Do you use organizations/locations? Do you see that in production.log even while you see the certificate errors? Did you use self signed certs that foreman installer generates?

Q: Do you use organizations/locations?
A: No

Q: Do you see that in production.log even while you see the certificate errors?
A: No, I changed certification file in ansible.cfg then after no certification error in “foreman-ssl_error_ssl.log”

Current certs in ansible.cfg:
“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”

Q: Did you use self signed certs that foreman installer generates?
A: yes! using the same one.

Hello Marek,

it is working as expected. hosts were going in to “Manage organisation” > “There is 1 host with no organisation assigned” so, have assigned those host to default organisation.

Thank you for your prompt reply and help :slight_smile:

1 Like