Remove puppet pinning logic
During the transition from puppet 2.7 to puppet 3.x we needed to add logic to carefully select what versions of puppet and related packages would be installed from the puppetlabs apt and yum repositories. Before puppet 4 was announced, we rightfully feared accidentally upgrading to backwards-incompatible versions of these packages and breaking the world. Now we are completely off of puppet 2.7, so we don't need to keep any remnants of that around. Moreover, the new packaging system for puppet 4 will make it impossible to accidentally upgrade[1]. The package name has changed from "puppet" to "puppet-agent", which has facter and hiera etc. bundled into the same package, and in order to get the new package we must add a new "puppet collections" repository. So, not only is this pinning logic not needed to keep us safe, it is also not going to be useful when we upgrade to puppet 4. Looking at the puppetlabs repositories[2][3] we are already using the latest version of the packages we are pinning and Puppet is definitely not going to add new versions to these repositories. The $puppet_version variable was leftover from when puppet.conf was managed by puppet and not ansible so this patch cleans that up as well. [1] https://docs.puppet.com/puppet/4.9/about_agent.html [2] http://apt.puppetlabs.com/dists/trusty/main [3] http://yum.puppetlabs.com/el/7/products/x86_64/ Change-Id: I06b5cd87ee7816b0f929d5e64dc66a5cceca222a
This commit is contained in:
parent
fb4a94317d
commit
f924a8bb5b
@ -4,4 +4,3 @@ baseurl=http://yum.puppetlabs.com/el/7/products/$basearch
|
|||||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
|
||||||
enabled=1
|
enabled=1
|
||||||
gpgcheck=1
|
gpgcheck=1
|
||||||
exclude=puppet-4* facter-3* puppetdb-3* puppetdb-terminus-3*
|
|
||||||
|
@ -221,26 +221,6 @@ class openstack_project::template (
|
|||||||
line => ' UseRoaming no',
|
line => ' UseRoaming no',
|
||||||
}
|
}
|
||||||
|
|
||||||
###########################################################
|
|
||||||
# Manage Puppet
|
|
||||||
# possible TODO: break this into openstack_project::puppet
|
|
||||||
|
|
||||||
case $pin_puppet {
|
|
||||||
'2.7.': {
|
|
||||||
$pin_facter = '1.'
|
|
||||||
$pin_puppetdb = '1.'
|
|
||||||
}
|
|
||||||
/^3\./: {
|
|
||||||
$pin_facter = '2.'
|
|
||||||
$pin_puppetdb = '2.'
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
fail("Puppet version not supported")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Which Puppet do I take?
|
|
||||||
# Take $puppet_version and pin to that version
|
|
||||||
if ($::osfamily == 'Debian') {
|
if ($::osfamily == 'Debian') {
|
||||||
# NOTE(pabelanger): Puppetlabs only support Ubuntu Trusty and below,
|
# NOTE(pabelanger): Puppetlabs only support Ubuntu Trusty and below,
|
||||||
# anything greater will use the OS version of puppet.
|
# anything greater will use the OS version of puppet.
|
||||||
@ -280,15 +260,6 @@ class openstack_project::template (
|
|||||||
replace => true,
|
replace => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/apt/preferences.d/00-puppet.pref':
|
|
||||||
ensure => present,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0444',
|
|
||||||
content => template('openstack_project/00-puppet.pref.erb'),
|
|
||||||
replace => true,
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/etc/default/puppet':
|
file { '/etc/default/puppet':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
@ -310,9 +281,6 @@ class openstack_project::template (
|
|||||||
replace => true,
|
replace => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$puppet_version = $pin_puppet
|
|
||||||
|
|
||||||
service { 'puppet':
|
service { 'puppet':
|
||||||
ensure => stopped,
|
ensure => stopped,
|
||||||
enable => false,
|
enable => false,
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
Package: puppet puppet-common puppetmaster puppetmaster-common puppetmaster-passenger
|
|
||||||
Pin: version <%= @pin_puppet %>*
|
|
||||||
Pin-Priority: 501
|
|
||||||
|
|
||||||
Package: puppetdb puppetdb-terminus
|
|
||||||
Pin: version <%= @pin_puppetdb %>*
|
|
||||||
Pin-Priority: 501
|
|
||||||
|
|
||||||
Package: facter
|
|
||||||
Pin: version <%= @pin_facter %>*
|
|
||||||
Pin-Priority: 501
|
|
Loading…
Reference in New Issue
Block a user