Unable to import ansible roles

Dear All,

have installed foreman 1.16 with Katello 3.5 on my test Centos 7 machine, i have copied role in /etc/ansible/roles, when i try to import role through UI CONFIGURE >> ROLES it gives “RestClient::InternalServerError
500 Internal Server Error” error,attached is full trace of error.
Foreman error.tar (19 KB)

also is there way to import roles in foreman through CLI

I am currently having the same issue - what seems to be happening is the ansible proxy config doesn’t expose https://$(ansible_hostname):8443/ansbile/roles - that seems to be the url the import call trys to reach.

It looks like the error comes from the proxy itself, not from Foreman. Could you share the contents of your /var/log/foreman-proxy/proxy.log when this happens?

Also what version of smart_proxy_ansible are you using? I see you’re using foreman_ansible 1.4.5.

There is nothing logged in /var/log/foreman-proxy/proxy.log, while importing roles when this error occurs.

Smart_proxy_ansible version is 1.1.1

https://projects.theforeman.org/issues/19149
https://gist.github.com/anonymous/da8f8b7485c23a5447adaeeac70a5c32

Ansible - Version 1.1.1
Foreman - Version 1.16

  • tfm-rubygem-foreman_ansible-1.4.6-1.fm1_16.el7.noarch
  • ansible-2.4.2.0-1.el7.noarch
  • tfm-rubygem-foreman_ansible_core-1.1.1-1.fm1_16.el7.noarch
  • rubygem-smart_proxy_ansible-1.1.1-1.fm1_15.el7.noarch

I see, it’s possible that the debugging level is not enough, can you:

switch ‘log_level’ to DEBUG on /etc/foreman-proxy/settings.yaml
restart the smart-proxy

Then check if there’s any output in that case?

for some reason this isn’t logging into the smart-proxy but this is what is logged on the ansible server when trying to import

   Feb 21 14:13:48 ansible_host smart-proxy: 2018-02-21 14:13:48 - NameError - uninitialized constant Proxy::Ansible::Api::ForemanAnsibleCore:
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/smart_proxy_ansible-1.1.1/lib/smart_proxy_ansible/api.rb:5:in `block in <class:Api>'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `block in compile!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `[]'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (3 levels) in route!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in `route_eval'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (2 levels) in route!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in `block in process_route'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `catch'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `process_route'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in `block in route!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `each'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `route!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in `block in dispatch!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in `dispatch!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `block in call!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `call!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:219:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/foreman-proxy/lib/proxy/log.rb:109:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/foreman-proxy/lib/proxy/request_id_middleware.rb:9:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/nulllogger.rb:9:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb:25:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `block in call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1787:in `synchronize'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/ruby/webrick/httpserver.rb:138:in `service'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/ruby/webrick/httpserver.rb:94:in `run'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/ruby/webrick/server.rb:295:in `block in start_thread'
    Feb 21 14:13:48 ansible_host smart-proxy: foreman_url - - [21/Feb/2018:14:13:48 CST] "GET /ansible/roles HTTP/1.1" 500 182845
    Feb 21 14:13:48 ansible_host smart-proxy: - -> /ansible/roles
    Feb 21 14:13:48 ansible_host smart-proxy: 2018-02-21 14:13:48 - NameError - uninitialized constant Proxy::Ansible::Api::ForemanAnsibleCore:
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/smart_proxy_ansible-1.1.1/lib/smart_proxy_ansible/api.rb:5:in `block in <class:Api>'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `block in compile!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `[]'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (3 levels) in route!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in `route_eval'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (2 levels) in route!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in `block in process_route'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `catch'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `process_route'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in `block in route!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `each'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `route!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in `block in dispatch!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in `dispatch!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `block in call!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `call!'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:219:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/foreman-proxy/lib/proxy/log.rb:109:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/foreman-proxy/lib/proxy/request_id_middleware.rb:9:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/nulllogger.rb:9:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb:25:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `block in call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1787:in `synchronize'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/gems/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/ruby/webrick/httpserver.rb:138:in `service'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/ruby/webrick/httpserver.rb:94:in `run'
    Feb 21 14:13:48 ansible_host smart-proxy: /usr/share/ruby/webrick/server.rb:295:in `block in start_thread'
    Feb 21 14:13:48 ansible_host smart-proxy: foreman_url - - [21/Feb/2018:14:13:48 CST] "GET /ansible/roles HTTP/1.1" 500 182845
    Feb 21 14:13:48 ansible_host smart-proxy: - -> /ansible/roles

Any luck ??? proxy log is not giving any relevant info

Personally that log was pulled from /var/log/messages. Nothing went into the proxy log.

These are really the keys. Thank you so much for that feedback.

Can you substitute the content of /usr/share/gems/gems/smart_proxy_ansible-1.1.1/lib /smart_proxy_ansible/api.rb:5 by https://gist.github.com/dLobatog/06995ee7b598dde83f9b755cc52128d4 ?

The changes are just namespacing ForemanAnsibleCore and requiring the gem. Do you have the tfm-rubygem-foreman_ansible_core package? Check that with rpm -q tfm-rubygem-foreman_ansible_core. If you don’t have it, please install it with yum install -y tfm-rubygem-foreman_ansible_core. It should have been installed by default, but it seems like something went wrong.

Thanks again for your feedback, it’s these kind of bug reports that make the project more stable & help other users :1st_place_medal:!

this was provided in a previous post tfm-rubygem-foreman_ansible_core-1.1.1-1.fm1_16.el7.noarch - but yes the core ruby gem is installed.

after updating the api.rb and trying to restart the proxy service I get this

Feb 22 11:20:52 ansible_server systemd[1]: Starting Foreman Proxy...
Feb 22 11:20:53 ansible_server smart-proxy[72081]: Errors detected on startup, see log for details. Exiting: cannot load such file -- foreman_ansible_core

I reinstalled the core rubygem - still have the same issue.

I just tried to reproduce the entire thing with the same version of the proxy & Foreman, still no luck but since it’s unable to find the foreman_ansible_core file…

What’s the content of your /opt/theforeman/tfm/root/usr/share/smart_proxy_dynflow_core/bundler.d/foreman_ansible_core.rb ? Does it exist? If not, can you create it with this:

gem ‘foreman_ansible_core’, ‘~> 1.1’

Do you have the package rubygem-smart_proxy_dynflow_core ?

Again, sorry for the grilling! Just trying to get this solved for you and hopefully anyone else who encounters the same problem.

All of this existed - I didn’t add anything.

[root@ansible_server bundler.d]# pwd
/opt/theforeman/tfm/root/usr/share/smart_proxy_dynflow_core/bundler.d
[root@ansible_server bundler.d]# cat foreman_ansible_core.rb
gem 'foreman_ansible_core', '~> 1.1'
[root@ansible_server bundler.d]# yum list installed | grep rubygem-smart
rubygem-smart_proxy_ansible.noarch    1.1.1-1.fm1_15.el7      @foreman-plugins
rubygem-smart_proxy_dynflow.noarch    0.1.7-1.el7             @foreman-plugins
tfm-rubygem-smart_proxy_dynflow_core.noarch

I had the same problem and found the solution on the foreman tracker.
There is a patch for roles_path so that it can contain more than one
path and that should be in 1.4.6 but it looks like it isn’t. Changing my
roles_path to just /etc/ansible/roles got the import working.

Regards,

Joop

Hi Joop ,

can you please share the link to tracker ?

also were do we need to update role_path as /etc/ansible/ansible.cfg already contain
roles_path = /etc/ansible/roles:/usr/share/ansible/roles

sharafraz schreef op 2018-02-23 13:46:

sarfarosh [1]
February 23

Hi Joop ,

can you please share the link to tracker ?

http://projects.theforeman.org/projects/ansible/search?utf8=✓&issues=1&q=roles_path
Then its the topmost link.

also were do we need to update role_path as /etc/ansible/ansible.cfg
already contain
roles_path = /etc/ansible/roles:/usr/share/ansible/roles
Change it to:
roles_path=/etc/ansible/roles

Try again to import roles. (don’t think you need to restart
foreman-proxy)

Joop

Above don’t work for me, below is error in log

2018-02-23 08:53:47 e60a311d [app] [W] Action failed
 | RestClient::InternalServerError: 500 Internal Server Error
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/abstract_response.rb:223:in `exception_with_response'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/abstract_response.rb:103:in `return!'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:809:in `process_result'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:725:in `block in transmit'
 | /opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:715:in `transmit'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:145:in `execute'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:52:in `execute'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/resource.rb:51:in `get'
 | /usr/share/foreman/lib/proxy_api/resource.rb:62:in `block in get'
 | /usr/share/foreman/lib/proxy_api/resource.rb:95:in `with_logger'
 | /usr/share/foreman/lib/proxy_api/resource.rb:59:in `get'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-1.4.5/app/lib/proxy_api/ansible.rb:23:in `roles'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-1.4.5/app/services/foreman_ansible/roles_importer.rb:46:in `remote_roles'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-1.4.5/app/services/foreman_ansible/roles_importer.rb:11:in `import_role_names'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-1.4.5/app/services/foreman_ansible/ui_roles_importer.rb:5:in `import!'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-1.4.5/app/controllers/ansible_roles_controller.rb:25:in `import'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:198:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.4.1/lib/audited/sweeper.rb:14:in `around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:455:in `public_send'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:455:in `block in make_lambda'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/rescue.rb:29:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `block in instrument'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `instrument'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:137:in `process'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionview-4.2.5.1/lib/action_view/rendering.rb:30:in `process'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal.rb:196:in `dispatch'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal.rb:237:in `block in action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:74:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:43:in `serve'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/journey/router.rb:43:in `block in serve'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/journey/router.rb:30:in `each'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/journey/router.rb:30:in `serve'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:815:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/lib/apipie/static_dispatcher.rb:65:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/lib/apipie/extractor/recorder.rb:136:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/etag.rb:24:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/conditionalget.rb:25:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/head.rb:13:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.5.0.1/lib/katello/params_parser_wrapper.rb:12:in `call'
 | /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:8:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/flash.rb:260:in `call'
 | /usr/share/foreman/lib/middleware/session_safe_logging.rb:17:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/session/abstract/id.rb:225:in `context'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/session/abstract/id.rb:220:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/cookies.rb:560:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/query_cache.rb:36:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:38:in `call_app'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:22:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/sprockets-rails-3.2.0/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 | /usr/share/foreman/lib/middleware/tagged_logging.rb:18:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/methodoverride.rb:22:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/runtime.rb:18:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/sendfile.rb:113:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/secure_headers-3.4.1/lib/secure_headers/middleware.rb:12:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/engine.rb:518:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/application.rb:165:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/railtie.rb:194:in `public_send'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/railtie.rb:194:in `method_missing'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/urlmap.rb:66:in `block in call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/urlmap.rb:50:in `each'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/rack-1.6.2/lib/rack/urlmap.rb:50:in `call'
 | /usr/share/passenger/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
 | /usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
 | /usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
 | /usr/share/passenger/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
2018-02-23 08:53:47 e60a311d [app] [I]   Rendered common/500.html.erb within layouts/application (14.8ms)
2018-02-23 08:53:47 e60a311d [app] [I]   Rendered layouts/_application_content.html.erb (1.8ms)
2018-02-23 08:53:47 e60a311d [app] [I]   Rendered layouts/base.html.erb (5.2ms)
2018-02-23 08:53:47 e60a311d [app] [I] Completed 500 Internal Server Error in 302ms (Views: 38.8ms | ActiveRecord: 37.5ms)
2018-02-23 08:53:49 671ce304 [app] [I] Started GET "/ansible/ansible_roles/import?proxy=1-foreman-ilmsystems-net" for 10.8.0.6 at 2018-02-23 08:53:49 -0400
2018-02-23 08:53:49 671ce304 [app] [I] Processing by AnsibleRolesController#import as HTML
2018-02-23 08:53:49 671ce304 [app] [I]   Parameters: {"proxy"=>"1-foreman-ilmsystems-net"}
2018-02-23 08:53:49 671ce304 [app] [I] Current user: admin (administrator)
2018-02-23 08:53:49 671ce304 [app] [W] Action failed
 | RestClient::InternalServerError: 500 Internal Server Error
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/abstract_response.rb:223:in `exception_with_response'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/abstract_response.rb:103:in `return!'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:809:in `process_result'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:725:in `block in transmit'
 | /opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:715:in `transmit'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:145:in `execute'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:52:in `execute'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/resource.rb:51:in `get'
 | /usr/share/foreman/lib/proxy_api/resource.rb:62:in `block in get'
 | /usr/share/foreman/lib/proxy_api/resource.rb:95:in `with_logger'
 | /usr/share/foreman/lib/proxy_api/resource.rb:59:in `get'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-1.4.5/app/lib/proxy_api/ansible.rb:23:in `roles'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-1.4.5/app/services/foreman_ansible/roles_importer.rb:46:in `remote_roles'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-1.4.5/app/services/foreman_ansible/roles_importer.rb:11:in `import_role_names'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-1.4.5/app/services/foreman_ansible/ui_roles_importer.rb:5:in `import!'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-1.4.5/app/controllers/ansible_roles_controller.rb:25:in `import'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:198:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.4.1/lib/audited/sweeper.rb:14:in `around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:455:in `public_send'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:455:in `block in make_lambda'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/rescue.rb:29:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `block in instrument'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `instrument'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:137:in `process'
 | /opt/rh/sclo-ror42/root/usr/share/gems/gems/actionview-4.2.5.1/lib/action_view/rendering.rb:30:in `process'

I had found that before there is only one role path in my config.

@dLobatog I have only have one line in my ansible.cfg as referenced by Joop1

and this was my response to the gem question.