Problem:
In the foreman proxy host, i can upload facts to foreman by running ansible-playbook in command line.
While running a remote job, using Ansible command in foreman, the job can finish with success, but no facts uploaded.
Expected outcome:
facts are uploaded together with Remote job
Foreman and Proxy versions:
Foreman: 1.21
Proxy: 1.21
run Ansible role via foreman will trigger the foreman callback though.
kraba
#3
From my notes, to run a callbackL
katello-service restart
vi /etc/ansible/ansible.cfg
[defaults]
callback_whitelist = foreman
[callback_foreman]
url = https://yourserver
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
and check if on WebUI the ansible plugin/features are present:
- Infrastructure → Smart Proxies → Dynflow, Logs, Pulp, Puppet, Puppet CA, SSH, TFTP, and Templates
- Administer → About → Plugins
and play and ansible role to obtain the facts:
- Hosts → All Hosts → Tick all/some hosts → Select Actions → Play Ansible Roles
- Wait and check if they reply to the ansible role
Create a recurring logics to run every 30 minutes an ansible callback:
Job Category: Ansible Playbook
Job Template: Ansible Callback
Search query (for me): content_view = My_View
Display advanced fileds: tick dynamic query
Schedule: recurring
Use: cronline */30 * * * *
Ends: never
Well, following job type works for me, WRT callback.
Job category : [Ansible Playbook]
Job template : [Ansible Roles - Ansible Default]
But this job type, it doesn;t trigger callback, any idea?
Job category : [Ansible Commands]
Job template : [Run Command - Ansible Default]
Thanks @kraba