Katello / katello-client-bootstrap

Bootstrap Script for migrating systems to Foreman & Katello
GNU General Public License v2.0
52 stars 63 forks source link

Make bootstrap.py compatible with Puppet 4 #229

Closed h4xr closed 6 years ago

h4xr commented 6 years ago

Currently bootstrap.py fails if the client is trying to install puppet-agent for Puppet 4. This seems to happen because of the change of the directory structure that is there with Puppet 4.

Puppet 3: The configuration files live in /etc/puppet/puppet.conf The executable is present in /usr/bin/puppet

Puppet 4: The configuration file is in /etc/puppetlabs/puppet/puppet.conf The executable is present in /opt/puppetlabs/puppet/bin/puppet

With the current version of bootstrap.py, it looks for the files according to Puppet 3 configuration and hence fails if the client is requesting for Puppet 4.

The question is should we detect the change in the puppet version inside bootstrap.py or allow the user to pass an option something like --install-puppet4 to handle this?

evgeni commented 6 years ago

I know, I initially proposed the --puppet4 switch on IRC, but now that I thought about it more…

So I think having a smart way to detect which puppet package was installed and acting accordingly is the way to go.

sideangleside commented 6 years ago

Correct. If anything, I'd rather an NVREA check against the package (since that is what we use to check versions of other packages and would consistent. There is no need (IMHO) to add an additional switch for this.