Foreman ansible role fail


Foreman ansible role fail with error Failed to initialize: NoMethodError - undefined method digest for nil:NilClass.
Expected outcome:
it should succeed, we have foreman with ansible role installed in our primary site and on the secondary remote site we have foreman proxy, installed with foreman-installer --scenario foreman-proxy-content --enable-foreman-proxy-plugin-ansible.
In our HQ all ansible roles are successfully run, but the secondary foreman on remote sites servers are failing with Failed to initialize: NoMethodError - undefined method `digest’ for nil:NilClass, even on the subnet we change the execution to the working ansible proxy, but still fails on the remote site. Remote excecution jobs are running on both sites with both foreman, HQ been the primary and vice versa without any issues, all ports are open. when changing remote servers location and host groups to the primary site it works. validated both configurations, subnets, hostgroups all Ok.
Foreman and Proxy versions:
Foreman 1.24 Version ansible 3.0.1 Version

Foreman and Proxy plugin versions:
Foreman 1.24 Version ansible 3.0.1 Version
Distribution and version:

Other relevant data:

No error message at all except. Failed to initialize: NoMethodError - undefined method `digest’ for nil:NilClass.

Can someone please shed some lights on what could be the problem?

1 Like

Can you please check the /var/log/foreman/production.log on the foreman server to see if there is a full stack trace there?

Nothing specific in the logs, i have removed it and ran: foreman-installer --scenario foreman-proxy-content --enable-foreman-proxy-plugin-ansible --enable-foreman-proxy-plugin-remote-execution-ssh

and worked strange thing i have not changed anything.

It was mentioned in earlier posts in regards to foreman 1.24 and pending ansible roles.

Just added this to my local foreman repo:

name=Foreman Nightly

name=Foreman Nightly - source

and updated the ansible core from 3.0.1 to 3.0.2 as so:

yum upgrade tfm-rubygem-foreman_ansible_core

rpm -qa | grep ansible

Thanks tbrisker for the response.

Hello everybody,

I’m having the same issue.

I did some testing and found out that this issue occurs once the theforeman.foreman_scap_client role is used.

I can’t find anything useful in /var/log/production.log but attached it to this post.
Do you have the same issue @Brascon02?

I’m using the following versions:

  • Foreman 2.14
  • Katello 3.16
  • tfm-rubygem-smart_proxy_ansible-3.0.1-6.fm2_1.el7.noarch
  • ansible-2.9.16-1.el7.noarch
  • tfm-rubygem-foreman_ansible-5.1.3-1.fm2_1.el7.noarch
  • ansiblerole-foreman_scap_client-0.0.4-1.el7.noarch
  • ansible-runner-1.4.6-1.el7.noarch

Any hints?

Best wishes and thanks a lot in advance.

production.log (31.7 KB)

Same issue, only with a Rocky Linux 8.5 host. re-ran the installer command and it now works… :open_mouth: