theforeman/puppet-foreman — pull request #252 by domcleal (2014-11-19 17:14:52+00:00)
Title: Fix command execution compatibility with Puppet < 3.4

It didn't pass our EL6 + 2.7.25 tests: http://ci.theforeman.org/job/systest_foreman/4559/consoleFull

# [ERROR 2014-11-19 14:22:39 verbose] Could not prefetch foreman_config_entry provider 'cli': undefined method `execute' for Puppet::Util::Execution:Module
# [ INFO 2014-11-19 14:22:39 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_config_entry/cli.rb:11:in `run_foreman_config'
# [ INFO 2014-11-19 14:22:39 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_config_entry/cli.rb:10:in `chdir'
# [ INFO 2014-11-19 14:22:39 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_config_entry/cli.rb:10:in `run_foreman_config'
# [ INFO 2014-11-19 14:22:39 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_config_entry/cli.rb:25:in `run_foreman_config'
# [ INFO 2014-11-19 14:22:39 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_config_entry/cli.rb:55:in `value'

This pretty much copies the fix from https://github.com/puppetlabs/puppetlabs-postgresql/blob/4.1.0/lib/puppet/provider/postgresql_psql/ruby.rb#L31-L33, plus changing $HOME so foreman-config doesn't complain. (Seems newer versions of Puppet set up the environment properly.)