diff --git a/Gemfile b/Gemfile index 1d0bc25..e26cb25 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,8 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org" group :development, :test do - gem 'rake' + # Pinning `rake` because `v11` doesn't support Ruby 1.8.7 + gem 'rake', '10.5.0' gem 'puppetlabs_spec_helper', :require => false # Pinning due to bug in newer rspec with Ruby 1.8.7 gem 'rspec-core', '3.1.7' diff --git a/manifests/master/config.pp b/manifests/master/config.pp index 91cd2bd..469dbdf 100644 --- a/manifests/master/config.pp +++ b/manifests/master/config.pp @@ -44,9 +44,10 @@ class puppetdb::master::config ( # puppetdb-terminus-3` which is impossible to do via Puppet. # # This will orphan some old terminus files (from pre-puppet-agent, i.e. puppet - # 3.x) that we're orphaned anyways and some of the new terminus files - # temporarily. If this exec fails all you need to do is reinstall whatever 2.3 - # version of the terminus was already installed to revert the change. + # 3.x) that are orphaned as part of the Puppet 3 to Puppet 4 upgrade anyways + # and some of the new terminus files temporarily. If this exec fails all you + # need to do is reinstall whatever 2.3 version of the terminus was already + # installed to revert the change. if !($puppetdb::params::puppetdb_version in ['present','absent']) and versioncmp($puppetdb::params::puppetdb_version, '3.0.0') >= 0 and $::osfamily in ['RedHat','Suse'] { @@ -54,6 +55,7 @@ class puppetdb::master::config ( command => 'rpm -e --justdb puppetdb-terminus', path => '/sbin/:/bin/', onlyif => 'rpm -q puppetdb-terminus', + before => Package[$terminus_package], } } diff --git a/spec/unit/classes/master/config_spec.rb b/spec/unit/classes/master/config_spec.rb index 71e769d..1aff959 100644 --- a/spec/unit/classes/master/config_spec.rb +++ b/spec/unit/classes/master/config_spec.rb @@ -1,21 +1,20 @@ require 'spec_helper' describe 'puppetdb::master::config', :type => :class do - basefacts = { - :fqdn => 'puppetdb.example.com', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - :kernel => 'Linux', - :lsbdistid => 'Debian', - :lsbdistcodename => 'foo', - :concat_basedir => '/var/lib/puppet/concat', - :id => 'root', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } let(:facts) do - basefacts + { + :fqdn => 'puppetdb.example.com', + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + :kernel => 'Linux', + :lsbdistid => 'Debian', + :lsbdistcodename => 'foo', + :concat_basedir => '/var/lib/puppet/concat', + :id => 'root', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } end context 'when PuppetDB on remote server' do