/Stage[main]/Foreman_proxy:fails to run installation of foreman on RHEL 7

Problem:
/Stage[main]/Foreman_proxy::Install/Package[foreman-proxy]/ensure: change from ‘purged’ to ‘present’ failed

Expected outcome:
Installation of foreman

Foreman and Proxy versions:

Foreman : 1.19.1
Proxy : Same.

Foreman and Proxy plugin versions:
ruby_gems:

  • { name: r10k, version: 2.6.4 }

rpm_urls:

yum_packages:

  • foreman-installer
  • puppetdb-termini

Distribution and version:

Other relevant data:
/Stage[main]/Foreman_proxy::Install/Package[foreman-proxy]/ensure: change from ‘purged’ to ‘present’ failed: Execution of ‘/bin/yum -d 0 -e 0 -y install foreman-proxy’ returned 1: Error: Package: foreman-proxy-1.19.1-1.el7.noarch (foreman)\n\u001b[0m\u001b[31m Requires: rubygem(rake) >= 0.8.3\n\u001b[0m\u001b[31m You could try using --skip-broken to work around the problem\n\u001b[0m\u001b[31m You could try running: rpm -Va --nofiles --nodigest\

I have seen existing build (Sept 18th) worked fine with the same code, have not changed anything from my end, anything need to be updated or added ? Let me know if you need more info.

You’ll also need to pull in the SCL repositories. yum -y install foreman-release-scl works on CentOS after enabling the Foreman repository.

Do note that 1.19 is End Of Life and 1.22 is the minimum supported version now though I’d recommend the latest stable (1.23).

Ok, I will give a try on new instance, however when I am trying the same on existing instance it says - already exists.

http://yum.puppetlabs.com/puppet5/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
Trying other mirror.
rhui-REGION-client-config-server-7 | 2.9 kB 00:00:00
rhui-REGION-rhel-server-extras | 3.4 kB 00:00:00
rhui-REGION-rhel-server-optional | 3.2 kB 00:00:00
rhui-REGION-rhel-server-releases | 3.5 kB 00:00:00
rhui-REGION-rhel-server-rh-common | 3.8 kB 00:00:00
(1/7): rhui-REGION-client-config-server-7/x86_64/primary_db | 4.0 kB 00:00:00
(2/7): rhui-REGION-rhel-server-extras/7Server/x86_64/updateinfo | 215 kB 00:00:00
(3/7): rhui-REGION-rhel-server-releases/7Server/x86_64/updateinfo | 3.5 MB 00:00:00
(4/7): rhui-REGION-rhel-server-optional/7Server/x86_64/updateinfo | 2.5 MB 00:00:00
(5/7): rhui-REGION-rhel-server-extras/7Server/x86_64/primary_db | 577 kB 00:00:00
(6/7): rhui-REGION-rhel-server-optional/7Server/x86_64/primary_db | 8.3 MB 00:00:00
(7/7): rhui-REGION-rhel-server-releases/7Server/x86_64/primary_db | 65 MB 00:00:01
Package foreman-release-scl-7-1.el7.noarch already installed and latest version
Nothing to do

Ok, I tried building AMI freshly and got the same problem:

/Stage[main]/Foreman_proxy::Install/Package[foreman-proxy]/ensure: change from ‘purged’ to ‘present’ failed: Execution of ‘/bin/yum -d 0 -e 0 -y install foreman-proxy’ returned 1: Error: Package: foreman-proxy-1.19.1-1.el7.noarch (foreman)\n\u001b[0m\u001b[31m Requires: rubygem(rake) >= 0.8.3\n\u001b[0m\u001b[31m You could try using --skip-broken to work around the problem\n\u001b[0m\u001b[31m You could try running: rpm -Va --nofiles --nodigest\n\u001b[0mPackage[puppet-agent-oauth] : 27/330%!(PACKER_COMMA) 8%%!(PACKER_COMMA) 1.0/s%!(PACKER_COMMA) elapsed: 00:01:04%!(PACKER_COMMA) ETA: 00:05:13\nPackage[tftp-server]

Also a following error:

/Stage[main]/Apache::Mod::Passenger/Apache::Mod[passenger]/Package[mod_passenger]/ensure: change from ‘purged’ to ‘present’ failed: Execution of ‘/bin/yum -d 0 -e 0 -y install mod_passenger’ returned 1: Error: Package: passenger-4.0.53-4.el7.x86_64 (epel)\n\u001b[0m\u001b[31m Requires: rubygem(rake)\n\u001b[0m\u001b[31m You could try using --skip-broken to work around the problem\n\u001b[0m\u001b[31m You could try running: rpm -Va --nofiles --nodigest\n\u001b[0mFile[passenger.conf]