diff --git a/manifests/params.pp b/manifests/params.pp index cd82c0b..5dcb33f 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -34,6 +34,13 @@ class jenkins::params { # Don't use ccache; not available on centos without EPEL and we # have wheel caches on fedora. $ccache_package = undef + + # Need to install haveged from EPEL on CentOS. + if ($::operatingsystem == 'CentOS') { + $haveged_install_options = ['--enablerepo', 'epel'] + } else { + $haveged_install_options = [] + } } 'Debian': { # common packages @@ -66,6 +73,7 @@ class jenkins::params { $ruby_package = 'ruby1.9.1' $ruby_dev_package = 'ruby1.9.1-dev' } + $haveged_install_options = [] } default: { fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian or RedHat (slaves only).") diff --git a/manifests/slave.pp b/manifests/slave.pp index e289dc4..3c0042b 100644 --- a/manifests/slave.pp +++ b/manifests/slave.pp @@ -8,7 +8,6 @@ class jenkins::slave( $gerrituser = 'jenkins', ) { - include ::haveged include ::pip include ::jenkins::params @@ -22,6 +21,10 @@ class jenkins::slave( } } + class { '::haveged': + haveged_install_options => $::jenkins::params::haveged_install_options, + } + anchor { 'jenkins::slave::update-java-alternatives': } # Packages that all jenkins slaves need