2018-11-07T11:40:13 [E|bac|] 500 Internal Server Error (RestClient::InternalServerError)
/usr/share/foreman/vendor/ruby/2.3.0/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:223:in `exception_with_response'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:103:in `return!'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:809:in `process_result'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:725:in `block in transmit'
proxy.log:
W, [2018-11-07T11:28:58.236954 #1512] WARN -- : Could not open DB for dynflow at '', will keep data in memory. Restart will drop all dynflow data.
[2018-11-07 11:28:58.567 #1512] INFO -- Execution plan cleaner removing 0 execution plans.
ruby-foreman-remote-execution is only one piece of the puzzle, for things to work properly you need to also have ruby-foreman-remote-execution-core package installed.
And you need the ssh plugin… Now i am finaly here:
UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n", "unreachable": true}
I generated the key like descripted at the Foreman manual (puppet_proxy_ssh)
Yeah but it was the wrong user.
The ssh plugin is using the user root.
Ansibe is using foreman-proxy.
Idk why the ansible plugin isn’t using the ssh plugin user.
But yeah. Just add remote_user = root at ansible.cfg
It should be using the root user account by default. The foreman-proxy user account contains the private key used to login to your servers as root or whatever you designate in the settings tab.
Just a suggestion, it might be better to place that value in global param, OS param, host_group param, or somewhere else within the app. since changes in the ansible.cfg file get clobbered with updates from what I’ve seen. It also allows for more fine-grained control.
I’ve seen my changes clobbered there before after re-running foreman-installer.
You might have some luck placing your local settings in one of the locations with a higher priority.
Changes can be made and used in a configuration file which will be processed in the following order:
* ANSIBLE_CONFIG (an environment variable)
* ansible.cfg (in the current directory)
* .ansible.cfg (in the home directory)
* /etc/ansible/ansible.cfg