Foreman ansible plugin installation failed with unmet dependencies

Problem: Foreman ansible plugin installation failed on a new installation of foreman

sudo foreman-installer --enable-foreman-plugin-ansible --enable-foreman-proxy-plugin-ansible

ruby-smart-proxy-dynflow-core : Depends: ruby-foreman-tasks-core (>= 0.3.3) but it is not going to be installed

apt search ruby-foreman-tasks-core
ruby-foreman-tasks-core/xenial,xenial 0.2.5-1 all

Expected outcome: ruby-smart-proxy-dynflow-core needs ruby-foreman-tasks-core (>= 0.3.3) but only 0.2.5-1 available

Foreman and Proxy versions:
dpkg -l | grep forem
ii foreman 1.24.2-1 amd64 Systems management web interface
ii foreman-cli 1.24.2-1 all metapackage providing hammer CLI for Foreman
ii foreman-debug 1.24.2-1 all provides support utility foreman-debug.
ii foreman-installer 1.24.2-1 all Automated puppet-based installer for The Foreman
ii foreman-postgresql 1.24.2-1 all metapackage providing PostgreSQL dependencies for Foreman
ii foreman-proxy 1.24.2-1 all RESTful proxies for DNS, DHCP, TFTP, and Puppet
ii ruby-foreman-ansible 4.0.5-1 all Foreman Ansible plugin
ii ruby-foreman-deface 1.5.3-1 all Foreman Deface Plugin Dependency
ii ruby-foreman-remote-execution 2.0.8-1 all Foreman Remote Execution Plugin
ii ruby-foreman-tasks 0.17.6-1 all Tasks management engine for Foreman.
ii ruby-hammer-cli-foreman 0.19.7-1 all Foreman commands for Hammer

Foreman and Proxy plugin versions:

Distribution and version: Ubuntu 16.04.6 LTS (Xenial Xerus)

Other relevant data: After installation apt update fails

Err:8 https://releases.ansible.com/ansible-runner/deb xenial InRelease
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY D430849D3DD29021

Ubgrad to Ubuntu 18.04 but did not help.

[ERROR 2020-03-14T22:02:27 main]  /Stage[main]/Foreman_proxy::Plugin::Ansible::Runner/Package[ansible-runner]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install ansible-runner' returned 100: Reading package lists...
[ERROR 2020-03-14T22:02:27 main] Building dependency tree...
[ERROR 2020-03-14T22:02:27 main] Reading state information...
[ERROR 2020-03-14T22:02:27 main] E: Unable to locate package ansible-runner
[ERROR 2020-03-14T22:02:27 main]  /Stage[main]/Apt::Update/Exec[apt_update]: Failed to call refresh: '/usr/bin/apt-get update' returned 100 instead of one of [0]
[ERROR 2020-03-14T22:02:27 main]  /Stage[main]/Apt::Update/Exec[apt_update]: '/usr/bin/apt-get update' returned 100 instead of one of [0]
[ERROR 2020-03-14T22:02:27 main] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:157:in `fail'

It tries to install ansible runner but it is not available in the Repo.
Err:14 https://releases.ansible.com/ansible-runner/deb bionic Release
404 Not Found [IP: 104.26.1.250 443]

Installed ansible-runner via pip for python2 and python3 - did not help
pip install ansible-runner

Found a related issue on github:

You can pass --foreman-proxy-plugin-ansible-install-runner false to avoid attempting to install the package. It looks like the GPG key was hardcoded which means there isn’t really an easy way to change it.

An alternative is to manage the repo yourself and pass --foreman-proxy-plugin-ansible-manage-runner-repo false.

Please file an issue at Issues - Installer - Foreman about this.

Many thanks. I did a new installation. Had the same error message but testet ansible and it did work.

The error message made me thinking there is something wrong … bus it was not.

Preparing installation Done
Something went wrong! Check the log for ERROR-level output

I’ll open a issue so that the error handling can be optimized.

For the record, I asked ansible-runner devs for bionic repo, hopefully they’ll build packages for it.

Many thanks.
The ansible call back works. Import of ansible roles too. But when I run a ansible job I get following error message:

2020-03-15T16:23:04 [I] WEBrick::HTTPServer#start: pid=10354 port=8443
2020-03-15T16:23:04 [I] Smart proxy has launched on 1 socket(s), waiting for requests
2020-03-15T16:23:05 [I] Finished puppet class cache initialization
W, [2020-03-16T10:16:10.708246 #10354] WARN – : Could not open DB for dynflow at ‘’, will keep data in memory. Restart will d
rop all dynflow data.
2020-03-16T10:16:12 [I] Execution plan cleaner removing 0 execution plans.
2020-03-16T10:16:12 135ec4ad [I] Started GET /dynflow/tasks/count state=running
2020-03-16T10:16:12 135ec4ad [I] Finished GET /dynflow/tasks/count with 200 (98.84 ms)
2020-03-16T10:16:14 ee61196e [I] Started GET /version
2020-03-16T10:16:14 ee61196e [I] Finished GET /version with 200 (22.64 ms)
2020-03-16T10:16:14 5e827a26 [I] Started POST /dynflow/tasks/launch
2020-03-16T10:16:14 5e827a26 [I] Finished POST /dynflow/tasks/launch with 404 (22.74 ms)
2020-03-16T10:16:14 b2f91ac6 [I] Started POST /dynflow/tasks/
2020-03-16T10:16:14 b2f91ac6 [W] Error processing request ‘b2f91ac6-29ff-4dd4-9b2f-230c3498f977
NameError: uninitialized constant ForemanRemoteExecutionCore
/usr/lib/ruby/vendor_ruby/dynflow/utils.rb:46:in block in constantize' /usr/lib/ruby/vendor_ruby/dynflow/utils.rb:44:in each’
/usr/lib/ruby/vendor_ruby/dynflow/utils.rb:44:in inject' /usr/lib/ruby/vendor_ruby/dynflow/utils.rb:44:in constantize’
/usr/lib/ruby/vendor_ruby/smart_proxy_dynflow_core/api.rb:39:in block in <class:Api>' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:1611:in call’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1611:in block in compile!' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:975:in block (3 levels) in route!’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:994:in route_eval' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:975:in block (2 levels) in route!’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1015:in block in process_route' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:1013:in catch’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1013:in process_route' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:973:in block in route!’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:972:in each' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:972:in route!’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1085:in block in dispatch!' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in block in invoke’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in catch' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in invoke’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1082:in dispatch!' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:907:in block in call!’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in block in invoke' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in catch’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1067:in invoke' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:907:in call!’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:895:in call' /usr/share/foreman-proxy/lib/proxy/log.rb:98:in call’
/usr/share/foreman-proxy/lib/proxy/request_id_middleware.rb:11:in call' /usr/lib/ruby/vendor_ruby/rack/protection/xss_header.rb:18:in call’
/usr/lib/ruby/vendor_ruby/rack/protection/path_traversal.rb:16:in call' /usr/lib/ruby/vendor_ruby/rack/protection/json_csrf.rb:18:in call’
/usr/lib/ruby/vendor_ruby/rack/protection/base.rb:50:in call' /usr/lib/ruby/vendor_ruby/rack/protection/base.rb:50:in call’
/usr/lib/ruby/vendor_ruby/rack/protection/frame_options.rb:31:in call' /usr/lib/ruby/vendor_ruby/rack/nulllogger.rb:9:in call’
/usr/lib/ruby/vendor_ruby/rack/head.rb:13:in call' /usr/lib/ruby/vendor_ruby/sinatra/show_exceptions.rb:25:in call’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:182:in call' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:2013:in call’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1487:in block in call' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:1787:in synchronize’
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1487:in call' /usr/lib/ruby/vendor_ruby/rack/urlmap.rb:66:in block in call’
/usr/lib/ruby/vendor_ruby/rack/urlmap.rb:50:in each' /usr/lib/ruby/vendor_ruby/rack/urlmap.rb:50:in call’
/usr/lib/ruby/vendor_ruby/rack/urlmap.rb:66:in block in call' /usr/lib/ruby/vendor_ruby/rack/urlmap.rb:50:in each’
/usr/lib/ruby/vendor_ruby/rack/urlmap.rb:50:in call' /usr/lib/ruby/vendor_ruby/rack/builder.rb:153:in call’
/usr/lib/ruby/vendor_ruby/rack/handler/webrick.rb:88:in service' /usr/lib/ruby/2.5.0/webrick/httpserver.rb:140:in service’
/usr/lib/ruby/2.5.0/webrick/httpserver.rb:96:in run' /usr/lib/ruby/2.5.0/webrick/server.rb:307:in block in start_thread’
/usr/lib/ruby/vendor_ruby/logging/diagnostic_context.rb:474:in `block in create_with_logging_context’

dpkg -l | grep ruby
ii libruby2.5:amd64 2.5.1-1ubuntu1.6 amd64 Libraries necessary to run Ruby 2.5
ii puppet-agent 6.14.0-1bionic amd64 The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera.
ii rake 12.3.1-1ubuntu0.1 all ruby make-like utility
ii ruby 1:2.5.1 amd64 Interpreter of object-oriented scripting language Ruby (default version)
ii ruby-algebrick 0.7.4-1 all Algebraic types and pattern matching for Ruby
ii ruby-ansi 1.5.0-1 all ANSI escape codes at your fingertips
ii ruby-apipie-bindings 0.3.0-1 all Ruby bindings for Apipie documented APIs
ii ruby-apipie-params 0.0.5-1 all DSL for describing data structures
ii ruby-augeas 1:0.5.0-3build6 amd64 Augeas bindings for the Ruby language
ii ruby-awesome-print 1.8.0-1 all pretty print Ruby objects with proper indentation and colors
ii ruby-bundler 1.16.1-1 all Manage Ruby application dependencies (runtime)
ii ruby-bundler-ext 0.4.1-1 all Load system gems via Bundler DSL
ii ruby-clamp 1.1.1-1 all minimal framework for Ruby command-line utilities
ii ruby-concurrent 1.1.6+dfsg-2 all modern concurrency tools for Ruby
ii ruby-dev:amd64 1:2.5.1 amd64 Header files for compiling extension modules for Ruby (default version)
ii ruby-did-you-mean 1.2.0-2 all smart error messages for Ruby > 2.3
ii ruby-domain-name 0.5.20160216-2 all Domain Name manipulation library for Ruby
ii ruby-dynflow 1.4.2-1 all DYNamic workFLOW orchestration engine
ii ruby-fast-gettext 1.3.0-1 all Fast GetText implementation for Ruby
ii ruby-ffi 1.9.10debian-1build4 amd64 load dynamic libraries, bind functions from within ruby code
ii ruby-foreman-ansible 4.0.5-1 all Foreman Ansible plugin
ii ruby-foreman-deface 1.5.3-1 all Foreman Deface Plugin Dependency
ii ruby-foreman-remote-execution 2.0.8-1 all Foreman Remote Execution Plugin
ii ruby-foreman-tasks 0.17.6-1 all Tasks management engine for Foreman.
ii ruby-foreman-tasks-core 0.3.4-1 all Foreman tasks - core bits
ii ruby-gssapi 1.2.0-1 all FFI wrapper around the system GSSAPI library
ii ruby-hammer-cli 0.19.2-1 all Universal command-line interface
ii ruby-hammer-cli-foreman 0.19.7-1 all Foreman commands for Hammer
ii ruby-hashie 3.5.5-2 all small collection of tools that make hashes more powerful
ii ruby-highline 1.7.8-1 all high-level interactive IO Ruby library
ii ruby-http-cookie 1.0.2-1 all Ruby library to handle HTTP Cookies based on RFC 6265
ii ruby-json 2.1.0+dfsg-2 amd64 JSON library for Ruby
ii ruby-jwt 2.2.1-1 all JSON Web Token implementation in Ruby
ii ruby-kafo 4.0.0-1 all Ruby gem for making installations based on puppet user friendly
ii ruby-kafo-parsers 1.0.0-1 all Puppet module parsers
ii ruby-kafo-wizards 0.0.1-1 all Wizard like interfaces in terminal
ii ruby-libvirt 0.7.0-1build2 amd64 Ruby bindings for libvirt
ii ruby-little-plugger 1.1.4-1 all module that provides Gem based plugin management
ii ruby-locale 2.1.2-1 all Locale library for Ruby
ii ruby-logging 2.2.2-1 all flexible and extendable logging library for Ruby
ii ruby-mime-types 3.1-1 all guess MIME type of files
ii ruby-mime-types-data 3.2015.1120-1 all registry for information about MIME media type definitions
ii ruby-minitest 5.10.3-1 all Ruby test tools supporting TDD, BDD, mocking, and benchmarking
ii ruby-molinillo 0.6.4-1 all generic dependency resolution algorithm
ii ruby-multi-json 1.12.1-1 all Ruby library to provide easy switching between different JSON backends
ii ruby-net-http-persistent 2.9.4-1 all Manages persistent connections using Net::HTTP
ii ruby-net-telnet 0.1.1-2 all telnet client library
ii ruby-netrc 0.11.0-1 all Ruby library to read and write netrc files
ii ruby-oauth 0.5.3-1 all Ruby library for OAuth core
ii ruby-oj:amd64 3.4.0-1build1 amd64 fast JSON parser and serializer for Ruby
ii ruby-power-assert 0.3.0-1 all library showing values of variables and method calls in an expression
ii ruby-powerbar 1.0.18-1 all progressbar library for Ruby
ii ruby-rack 1.6.4-4ubuntu0.1 all modular Ruby webserver interface
ii ruby-rack-protection 1.5.3-2+deb9u1build0.18.04.1 all Protects against typical web attacks for Rack apps
ii ruby-rb-inotify 0.9.7-1 all A Ruby wrapper for Linux’s inotify, using FFI
ii ruby-rest-client 2.0.2-3 all simple REST client for Ruby
ii ruby-rkerberos 0.1.3-3 amd64 Kerberos binding for Ruby
ii ruby-rsec 0.4.2-1 all Parser / Regexp Combinator For Ruby
ii ruby-rubyipmi 0.10.0-1 all A ruby wrapper for ipmi command line tools that supports ipmitool and freeipmi
ii ruby-sequel 5.6.0-1 all Simple, flexible, and powerful SQL database access toolkit for Ruby
ii ruby-sinatra 1.4.8-1 all Ruby web-development dressed in a DSL
ii ruby-smart-proxy-ansible 3.0.0-2 all Ansible support for Foreman smart proxy
ii ruby-smart-proxy-dynflow 0.2.4-1 all Dynflow runtime for Foreman smart proxy
ii ruby-smart-proxy-dynflow-core 0.2.4-1 all Dynflow runtime for Foreman smart proxy
ii ruby-sqlite3 1.3.13-1build2 amd64 SQLite3 interface for Ruby
ii ruby-test-unit 3.2.5-1 all unit testing framework for Ruby
ii ruby-thor 0.19.4-1 all Ruby scripting framework
ii ruby-tilt 2.0.1-2 all Generic interface to multiple Ruby template engines
ii ruby-unf 0.1.4-2 all Wrapper library to bring Unicode Normalization Form support to Ruby
ii ruby-unf-ext 0.0.7.4-1build2 amd64 Unicode Normalization Form support library for CRuby
ii ruby-unicode 0.4.4-2build8 amd64 Unicode string manipulation library for Ruby
ii ruby-unicode-display-width 1.1.3-1 all Determines the monospace display width of a string in Ruby
ii ruby-xmlrpc 0.3.0-2 all XMLRPC library for Ruby
ii ruby2.5 2.5.1-1ubuntu1.6 amd64 Interpreter of object-oriented scripting language Ruby
ii ruby2.5-dev:amd64 2.5.1-1ubuntu1.6 amd64 Header files for compiling extension modules for the Ruby 2.5
ii ruby2.5-doc 2.5.1-1ubuntu1.6 all Documentation for Ruby 2.5
ii rubygems-integration 1.11 all integration of Debian Ruby packages with Rubygems

They just built bionic packages (untested) https://releases.ansible.com/ansible-runner/deb/dists/bionic/

please let us know if that works. It does not help with the error you sent last, that seems like a REX issue on debian, I know someone reported something similar in the past. I think REX on debian is broken for a while.

@mmoll has been working on that in nightly. Has this already been backported to a release?

Perfect. Thank you. The installation is working now without any error. (Had the same missing public_key as on 16.04. -> will open a case for that).

How can I test the ansible-runner? Or is it ok if I get the right version like below?

ansible-runner --version
1.4.4

@Marek_Hulan @aruzicka is there a require 'foreman_tasks_core' missing in smart_proxy_dynflow_core (or elsewhere)? I can’t really deduce it from the backtrace, but maybe launcher.rb or even helpers.rb?

I’m a bit foggy about how things are packaged on deb, but shouldn’t the ruby-foreman-remote-execution-core package be installed? And the same probably applies for ansible-core

I was able to install ‘‘sudo apt install ruby-foreman-remote-execution-core’’

But got an error during ‘‘sudo apt install ruby-foreman-ansible-core’’

Unpacking ruby-foreman-ansible-core (3.0.1-1) …
dpkg: error processing archive /var/cache/apt/archives/ruby-foreman-ansible-core_3.0.1-1_all.deb (–unpack):
trying to overwrite ‘/usr/bin/json_inventory.sh’, which is also in package ruby-smart-proxy-ansible 3.0.0-2
Errors were encountered while processing:
/var/cache/apt/archives/ruby-foreman-ansible-core_3.0.1-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

yeah probably the best you can do now, the better test would be to see that Foreman can run some ansible playbook however that’s only possible when the other issue discussed here is resolved

Installed with ‘‘sudo dpkg -i --force-overwrite /var/cache/apt/archives/ruby-foreman-ansible-core_3.0.1-1_all.deb’’

Same problem.

sudo grep -r -i 'ForemanRemoteExecutionCore' /usr/share/
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_ansible-4.0.5/test/unit/services/inventory_creator_test.rb:      assert_equal ForemanRemoteExecutionCore.settings[:ssh_identity_key_file],
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_ansible-4.0.5/app/services/foreman_ansible/inventory_creator.rb:        ForemanRemoteExecutionCore.settings[:ssh_identity_key_file]
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/dispatcher.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/dispatcher.rb:      @refresh_interval ||= ForemanRemoteExecutionCore.settings[:runner_refresh_interval] ||
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/dispatcher.rb:                              ForemanRemoteExecutionCore.runner_class::DEFAULT_REFRESH_INTERVAL
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/fake_script_runner.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/actions.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/actions.rb:        ForemanRemoteExecutionCore.runner_class.build(input.merge(additional_options),
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/actions.rb:        ForemanRemoteExecutionCore::Dispatcher.instance
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/version.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/log_filter.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/script_runner.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/script_runner.rb:      ssh_options[:logger] = ForemanRemoteExecutionCore::LogFilter.new(SmartProxyDynflowCore::Log.instance)
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/script_runner.rb:      ForemanRemoteExecutionCore.settings
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/polling_script_runner.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution-2.0.8/app/lib/actions/remote_execution/run_host_job.rb:        plan_delegated_action(proxy, ForemanRemoteExecutionCore::Actions::RunScript, action_options)

sudo grep -r -i 'foreman_tasks_core' /usr/share/
...
/usr/share/smart_proxy_dynflow_core/lib/smart_proxy_dynflow_core.rb:require 'foreman_tasks_core'
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_ansible-4.0.5/test/unit/lib/foreman_ansible_core/playbook_runner_test.rb:# Playbook Runner - this class uses foreman_tasks_core
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/dispatcher.rb:require 'foreman_tasks_core/runner/dispatcher'
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/actions.rb:require 'foreman_tasks_core/shareable_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core.rb:require 'foreman_tasks_core'
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core.rb:    require 'foreman_tasks_core/runner'
...

Folling files do have ForemanRemoteExecutionCore but not foreman_tasks_core

/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_ansible-4.0.5/test/unit/services/inventory_creator_test.rb: assert_equal ForemanRemoteExecutionCore.settings[:ssh_identity_key_file],
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_ansible-4.0.5/app/services/foreman_ansible/inventory_creator.rb: ForemanRemoteExecutionCore.settings[:ssh_identity_key_file]
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/fake_script_runner.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/version.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/log_filter.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/script_runner.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/script_runner.rb: ssh_options[:logger] = ForemanRemoteExecutionCore::LogFilter.new(SmartProxyDynflowCore::Log.instance)
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/script_runner.rb: ForemanRemoteExecutionCore.settings
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution_core-1.3.0/lib/foreman_remote_execution_core/polling_script_runner.rb:module ForemanRemoteExecutionCore
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_remote_execution-2.0.8/app/lib/actions/remote_execution/run_host_job.rb: plan_delegated_action(proxy, ForemanRemoteExecutionCore::Actions::RunScript, action_options)

Which OS should I use to get a running ansible foreman installation? Looks like ubuntu is not the best option.

CentOS 7 is the most tested base OS and the one used by the majority of users. It is also the only one supported if you want to use the Katello plugin (keep in mind if you do want to use Katello it can’t be added on to an existing installation but rather has to be installed from the start).

Thank you. i will test with CentOS.