We have:
Ubuntu 16.04
Foreman 1.18.0-1
foreman-proxy: 1.18.0-1
We try to install ansible plugin (ruby-foreman-ansible 2.0.1-1) and get always a error.
apt install ruby-foreman-ansible
error: dpkg: error processing package ruby-foreman-ansible (–configure):
subprocess installed post-installation script returned error exit status 6
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
Logfile : /var/log/foreman-install.log
Resolving dependencies…
Some gems seem to be missing from your vendor/cache directory.
Bundler could not find compatible versions for gem “dynflow”:
In snapshot (Gemfile.lock):
dynflow (= 1.1.0)
In Gemfile:
dynflow (< 2.0.0, >= 1.0.0)
foreman-tasks (= 0.13.2) was resolved to 0.13.2, which depends on
dynflow (>= 1.0.5, ~> 1.0)
foreman_ansible (= 2.0.1) was resolved to 2.0.1, which depends on
dynflow (~> 0.8.14)
Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
bundle update not possible: Server is not connected to internet.
PROD - Hearth [root@foreman /usr]# apt install ruby-foreman-ansible
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
ruby-foreman-ansible
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,652 kB of archives.
After this operation, 19.6 MB of additional disk space will be used.
Selecting previously unselected package ruby-foreman-ansible.
(Reading database … 204996 files and directories currently installed.)
Preparing to unpack …/ruby-foreman-ansible_2.2.6-1_all.deb …
Unpacking ruby-foreman-ansible (2.2.6-1) …
Setting up ruby-foreman-ansible (2.2.6-1) …
dpkg: error processing package ruby-foreman-ansible (–configure):
subprocess installed post-installation script returned error exit status 6
Errors were encountered while processing:
ruby-foreman-ansible
E: Sub-process /usr/bin/dpkg returned an error code (1)
I set debug on the postinst script that is failing. It appears that ‘/usr/bin/foreman-ruby /usr/bin/bundle install --local --no-prune’ is existing with status of 6 causing the postinst script to fail.
Could not find gem ‘foreman_remote_execution (< 2.0, >= 1.4.4)’, which is
required by gem ‘foreman_ansible (= 2.2.6)’, in any of the sources.
Don’t run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Resolving dependencies…
Some gems seem to be missing from your vendor/cache directory.
Bundler could not find compatible versions for gem “foreman_remote_execution”:
In Gemfile:
foreman_ansible (= 2.2.6) was resolved to 2.2.6, which depends on
foreman_remote_execution (< 2.0, >= 1.4.4)
Could not find gem ‘foreman_remote_execution (< 2.0, >= 1.4.4)’, which is
required by gem ‘foreman_ansible (= 2.2.6)’, in any of the sources.
I installed the ‘ruby-foreman-remote-execution’ package and that fixed the bundle errors which allowed the ansible plugin to install successfully. So at this time there is dependency for ‘ruby-foreman-remote-execution’ that is not in the dpkg info.