I installed foreman 1.16 in OEL7 without errors following the official guide at end I enable ansible plugins, remote-executions and remote–execution-ssh

sudo foreman-installer --enable-foreman-plugin-ansible  --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh
ansible --version

  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/aravicov/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, May 29 2017, 20:42:36) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]

when I run ansible -m setup remote-server I see it is getting ansible facts from that server.

when I check
sudo tail -f /var/log/foreman/production.log

I dont see anything about facts . it is like I never executed

This is my list of plugins installed on foreman 1.16
foreman-tasks 0.10.9
foreman_ansible 1.4.6
foreman_remote_execution 1.3.3
foreman_setup 5.0.0

Have you configured the ansible callback in ansible.cfg? See Foreman :: Plugin Manuals for more info. We observed the similar behavior with nightlies, so there might be some issue with callback and recent version of ansible.

1 Like

If the callback is configured, is there any output of ansible that might indicate an issue sending facts and reports to Foreman?

Yes, I configured ansible_callback

bin_ansible_callbacks = True
callback_whitelist = foreman

So as @bastilian suggested, it would be good to see the output. Try finding the foreman task that represented the ansible run and ideally upload all information from it here. You should be able to find it somewhere in Monitor -> Tasks. This can happen if the ansible callback does not have correct connection params set through env variables or Foreman does not trust the host on which ansible is executed.

I installed Ansible and Foreman in the same machine to do test . I executed ansible -m setup remote-server as root and as user foreman . I was able to get ansible facts of that remote-server . I checked foreman for foreman task . I have two task with ls but I was unable to edit that task to change for doing ansible test !! I also look online for an example how to run a task with ansible