Problem:
I’m using Foreman 1.22 to provision Ubuntu 18.04 hosts.
I also want to maintain the Puppet version across all my nodes, including the Puppet master. In a base class, I simply have the following:
class profile::puppet::agent (
$manage_puppet = true,
) {
if $manage_puppet {
class { '::puppet_agent':
collection => 'puppet5',
}
}
}
When I run puppet agent --test
on the nodes, puppet complains about the Puppet version installed by Foreman vs. the one expected by puppetlabs::puppet_agent itself:
web1 # puppet agent --test
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, The puppet_agent module does not support pre-Puppet 4 upgrades. (file: /etc/puppetlabs/code/environments/production/modules/puppet_agent/manifests/init.pp, line: 115, column: 5) on node web1.example.org
web1 #
I believe this is happening because Foreman installs Puppet from the Ubuntu repo, while Puppet expects something different-- an AIO install, perhaps?
Expected outcome:
I was expecting the module to upgrade the Puppet agent to the current Puppet5 version.
Foreman and Proxy versions:
Foreman 1.22.1.
Foreman and Proxy plugin versions:
n/a
Other relevant data:
n/a