From 50736a41d748824892ea82a48066763ec921dafc Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 9 Oct 2012 16:16:56 -0700 Subject: [PATCH] Fix rubygems dependencies in jenkins::slave The rubygems package is only installed on non bare slaves but the slave manifest attempts to install the puppet-lint gem on all slaves which requires the rubygems package. Only attempt to install gems when the slave is a not a bare slave. Change-Id: Ifc09d15340eed97b35a865a1475a52172f7c9b25 Reviewed-on: https://review.openstack.org/14260 Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- modules/jenkins/manifests/slave.pp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/modules/jenkins/manifests/slave.pp b/modules/jenkins/manifests/slave.pp index 7f64051d30..1f49b0b01e 100644 --- a/modules/jenkins/manifests/slave.pp +++ b/modules/jenkins/manifests/slave.pp @@ -55,6 +55,19 @@ class jenkins::slave($ssh_key, $sudo = false, $bare = false, $user = true) { ensure => present, } + if ($bare == false) { + $gem_packages = [ + 'puppet-lint', + 'puppetlabs_spec_helper', + ] + + package { $gem_packages: + ensure => latest, + provider => gem, + require => Package['rubygems'], + } + } + # Packages that need to be installed from pip $pip_packages = [ "setuptools-git", @@ -66,17 +79,6 @@ class jenkins::slave($ssh_key, $sudo = false, $bare = false, $user = true) { require => Class[pip] } - $gem_packages = [ - 'puppet-lint', - 'puppetlabs_spec_helper', - ] - - package { $gem_packages: - ensure => latest, - provider => gem, - require => Package['rubygems'], - } - package { 'git-review': ensure => '1.17', provider => pip,