Can someone help me set ansible up on foreman?

Can someone help me set ansible up?
I am looking in the documentation

If you want to use Ansible to submit facts/reports to Foreman through the callback by running Ansible directly (not from Foreman) <Well I do want to set it up on the foreman server, so where are the instructions for that>, you should add whatever hosts (except Smart Proxies) you want to submit facts from to the setting trusted_hosts <Great, I want reports FROM node1, so I guess I add Node 1 to trusted hosts> . Change it at Administer > Settings, Auth tab <There is no "auth"tab but you obviously mean “authentication”, not a problem>. e.g: If you’re running Ansible from host ‘A’, which SSHs into host ‘B’, you need to add host ‘A’<So I add the foreman server to trusted hosts, not node1>

Either way it’s academic as when I add any host to "trusted hosts it says “Value is invalid: must be an array”

oh you have to be kidding me!

"you need to specify it in Ruby syntax, so for a single host it would be [
myhost.domain.com ]"

Just how was I supposed to work that out?
Its a great product but your fundamental issues, is it is designed and documented by people who assume everyone just “knows”. No wonder it has the reputation it does.

Still I will carry on.

It’s in the documentation: https://www.theforeman.org/manuals/2.1/index.html#trusted_hosts

I don’t think that. You have the foreman documentation as well as the RedHat Satellite documentation which covers many things. The foreman documentation is not as perfectly organized as the RedHat docs but still contains the important things. Just for newer functions it is what is always is when it’s coming out of open source: it takes a while until it is gets properly documented. And in particular the plugins are backed by a even smaller group so docs there might be even a little bit more behind.

But that’s the good thing: I am sure they are more than happy about any help improving the docs…

Do these instructions help:

https://theforeman.github.io/foreman-documentation/master/doc-Managing_Hosts/index-foreman.html#chap-Red_Hat_Satellite-Managing_Hosts-Integrating_Satellite_and_Ansible_Tower

Technically it’s YAML.

Thanks for the replies.
I can select “run ansible roles” from foreman, and it appears to run and a “report” is shown for the node.However there is nothing in the script (see below), so it does nothing.

I have tried adding roles but there is nothing installed. The issue may be this instruction
“Here’s a quick gif of what registering a new host in Foreman looks like.”
I have retinitis pigmentosa at a fairly advanced stage, and you could not come up with a worse way to convey information to those of us who are partially sighted . I had to bite the bullet and ask a colleague for help and he came back that he could not even tell where the video began. My fault for choosing an idiot.

Am i missing role templates?

  • hosts: all
    pre_tasks:
    • name: Display all parameters known for the Foreman host
      debug:
      var: foreman
      tasks:
    • name: Apply roles
      include_role:
      name: “{{ role }}”
      loop: “{{ foreman_ansible_roles }}”
      loop_control:
      loop_var: role