Bug #16919
closedExpose "puppet" puppet module at top of installer, don't wrap inside puppet-capsule
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1371093
Description of problem:
The capsule installer is remvoing the environment setting of puppet. This is a setting that contains the puppet environment as managed by Satellite itself. The capsule feature does not use it and it shall therefor keep the old value.
We manage the puppet.conf to set the environment to the expected KT_ environment so the correct environment is used also during the puppet plugin (facts .rb files) downloading. And also that the user can do a "puppet agent -t -v" runs is without taking care of setting the correct environment.
Below is the output when (re-)running satellite-installer --scenario=capsule
[ WARN 2016-08-29 10:01:15 verbose] /Stage[main]/Puppet::Config/Concat[/etc/puppet/puppet.conf]/File[/etc/puppet/puppet.conf]/content:
[ INFO 2016-08-29 10:01:15 verbose] --- /etc/puppet/puppet.conf 2016-08-26 12:16:38.107374178 0000
[ INFO 2016-08-29 10:01:15 verbose] ++ /tmp/puppet-file20160829-13497-sxpk6c-0 2016-08-29 10:01:15.728826271 +0000
[ INFO 2016-08-29 10:01:15 verbose] @ -55,7 +55,7
@
[ INFO 2016-08-29 10:01:15 verbose] report = true
[ INFO 2016-08-29 10:01:15 verbose] pluginsync = true
[ INFO 2016-08-29 10:01:15 verbose] masterport = 8140
[ INFO 2016-08-29 10:01:15 verbose] - environment = KT_Hilti_Library_hg_crash__Infra__Sat6Sandbox_Capsule_58
[ INFO 2016-08-29 10:01:15 verbose] + environment = production
[ INFO 2016-08-29 10:01:15 verbose] certname = li-lc-1589.hag.hilti.com
[ INFO 2016-08-29 10:01:15 verbose] server = li-lc-1589.hag.hilti.com
[ INFO 2016-08-29 10:01:15 verbose] listen = false
[ INFO 2016-08-29 10:01:15 verbose] Computing checksum on file /etc/puppet/puppet.conf
Proposal for a fix is to create a fact with the current puppet environment and then use that fact in the puppet.conf.erb file.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Create server attach to Sat6 managed with puppet
2. Have a puppet module to also manage the puppet.conf to set the environment to the expected KT_ environment.
3. Run "satellite-installer --scenario=capsule" o the capsule
Actual results:
puppet.conf environment setting is reverted back to "production"
Expected results:
the existing puppet.conf environment setting is untouched
Additional info: