Description:
Foreman Host
Hello everyone, i try to configure foreman and rely the ansible’s inventory host to it.
On the first step, i made this without a problem :
foreman-installer --enable-foreman-plugin-ansible
–enable-foreman-proxy-plugin-ansible
–enable-foreman-cli-ansible
What i changed into the foreman website configuration on the authentification
|Trusted hosts|[ansiblehost]
|SSL certificate|/etc/puppetlabs/puppet/ssl/certs/foremanhost.pem
|SSL CA file|/etc/puppetlabs/puppet/ssl/certs/ca.pem|
|SSL private key|/etc/puppetlabs/puppet/ssl/private_keys/foremanhost.key.pem
On my ansible host :
ansible-galaxy collection install theforeman.foreman
Ansible cfg :
[defaults]
interpreter_python = auto_silent
inventory = /etc/ansible/hosts
callback_whitelist = foreman
stdout_callback = debug
[inventory]
[privilege_escalation]
[paramiko_connection]
[ssh_connection]
[persistent_connection]
connect_timeout = 30
[accelerate]
[selinux]
[colors]
[diff]
deprecation_warnings=False
[callback_foreman]
url = https://foremanhost/
ssl_cert = /home/admin/foremanhost.pem
ssl_key = /home/admin/foremanhost.key.pem
verify_certs = /home/admin/ca.pem
those *.pem certificate was into my foreman server under the directory /etc/puppetlabs/puppet/ssl/certs/
so i scp them to my ansible host.
Problem:
When i try to run one playbook that way :
just to run some gather_fact to the foreman host
ansible-playbook foreman.yml -b -K
cat foreman.yml
hosts: recette
become: true
gather_facts: yestasks:
- name: Distribution
debug: msg=“{{ ansible_distribution }}”
It seems to work since i see into
Monitor > Audit
All my servers from the ansible inventory gather_fact but none of them are present into the “All Host” section
Many thanks for the help
Distribution and version:
On the Foreman server
Red Hat Enterprise Linux release 8.9 (Ootpa)