Installed and successfully tested Ansible stand alone with sample playbooks and roles.
Installed and successfully tested the Foreman remote execution plugin (including installing and testing foreman-proxy certificates)
Installed the Ansible and Ansible proxy plugins using the foreman-installer
However when attempting to deploy the same Ansible role using the plugin it fails with the error message included below. I guess it relates to some file permissions or something similarly obvious, but I’ve yet to trace the cause. Anyone got any suggestions?
Foreman-proxy user doesn’t have permission to create .ansible directory
in /usr/share/foreman-proxy. Create it and give foreman-proxy rights to
it. Depending on versions you might hit ssh-key problems next.
The original error message has gone, but has been replaced by another one. I guess this is the ssh-key issue alluded to by @Joop1…? BTW… the remote shell plug-in continues to work just fine to the same host so is it safe to assume that keys and known_hosts are correctly configured? Any suggestions?
@dLobatog - quick feature request while I’m at it… I can log it elsewhere if needed… let me know.
Feature Request
Puppet is correctly updated after a host rebuild but remote execution (and likely Ansible) fail due to outdated known_hosts. Is it possible to fix this? The last line on the provisioning scripts is the following foreman ping…
I guess this is used to update the associated records on the foreman post installation and maybe sign puppet keys? Could we take care of remote execution/Ansible at the same time? Maybe something as simple as… ssh-keygen -R <myhost> -f ~foreman-proxy/.ssh/known_hosts
Looks like it might be the ssh-key problem.
Two ways to solve this I think. One in Settings you can add the path of
the desired key. There was a thread about it recently.
Second, make a link from id_rsa_foreman_proxy to id_rsa and also for the
pubkey part.