diff --git a/NEWS b/NEWS index 7387eeb23ea49512fed8f01242d5fe890436073d..86532c60a43b97241a6266d5b1f433ac63fddf59 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -release/??????? (2015-02-25) +release/??????? (2015-02-27) Beginning of work to support RHEL-ish operating systems such as CentOS and Oracle Linux. The most common change @@ -7,6 +7,10 @@ release/??????? (2015-02-25) potentially affect any existing hosts. There may be some additional refinements when CentOS and Oracle hosts come online; for now, we're assuming they act identical to RHEL. + + Additionally modified puppetclient.pp to support version + locking of puppet and facter versions on RHEL systems. + Added one additional manifest to facilitate this. (jlent) release/004.030 (2015-02-25) diff --git a/manifests/puppetclient.pp b/manifests/puppetclient.pp index 2ddf60edb3935ee1b9ede039582f76204a6ec1d3..2c4112cf8ba36b3441e4fd99f833f8a3f71cec00 100644 --- a/manifests/puppetclient.pp +++ b/manifests/puppetclient.pp @@ -1,3 +1,4 @@ +# install and configure the puppet client class base::puppetclient { file { '/etc/puppet': ensure => directory, @@ -7,9 +8,19 @@ class base::puppetclient { ensure => present, } - package { 'puppet': - ensure => present, - require => Base::Puppetclient::Config['/etc/puppet/puppet.conf'], + # pin puppet and facter versions on RHELish systems + if ($::osfamily == 'RedHat') { + include base::yumtools::yum_puppet_lock + package { 'puppet': + ensure => present, + require => [ Base::Puppetclient::Config['/etc/puppet/puppet.conf'], + Class['base::yumtools::yum_puppet_lock'] ], + } + } else { # Debianish systems; pinning handled at repository level + package { 'puppet': + ensure => present, + require => Base::Puppetclient::Config['/etc/puppet/puppet.conf'], + } } # It appears that on recently updated wheezy servers, 2.x clients need diff --git a/manifests/yumtools/yum_puppet_lock.pp b/manifests/yumtools/yum_puppet_lock.pp new file mode 100644 index 0000000000000000000000000000000000000000..3d5a12ad855c6ccd65841abb7ae52fd32dcc6ecb --- /dev/null +++ b/manifests/yumtools/yum_puppet_lock.pp @@ -0,0 +1,17 @@ +# Parameterized class to lock puppet and facter versions +# on RHEL-ish hosts using yum versionlock +# facter_version: the yum-aware version of facter to lock +# puppet_version: the yum-aware version of puppet to lock +class base::yumtools::yum_puppet_lock ( + $facter_version = '2.2.0-1', + $puppet_version = '3.7.2-1' +) { + base::yumtools::versionlock { + "0:puppet-${puppet_version}.el${::lsbmajdistrelease}*": + ensure => present, + } + base::yumtools::versionlock { + "1:facter-${facter_version}.el${::lsbmajdistrelease}*": + ensure => present, + } +}