diff --git a/modules/jenkins/manifests/master.pp b/modules/jenkins/manifests/master.pp index 09ecd11c34..53b5d077df 100644 --- a/modules/jenkins/manifests/master.pp +++ b/modules/jenkins/manifests/master.pp @@ -17,6 +17,15 @@ class jenkins::master( include apt include apache + package { 'openjdk-7-jre-headless': + ensure => present, + } + + package { 'openjdk-6-jre-headless': + ensure => purged, + require => Package['openjdk-7-jre-headless'], + } + #This key is at http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key apt::key { 'jenkins': key => 'D50582E6', @@ -28,7 +37,10 @@ class jenkins::master( location => 'http://pkg.jenkins-ci.org/debian', release => 'binary/', repos => '', - require => Apt::Key['jenkins'], + require => [ + Apt::Key['jenkins'], + Package['openjdk-7-jre-headless'], + ], include_src => false, } diff --git a/modules/jenkins/manifests/params.pp b/modules/jenkins/manifests/params.pp index 2ef1ee35ca..b282c9e33d 100644 --- a/modules/jenkins/manifests/params.pp +++ b/modules/jenkins/manifests/params.pp @@ -69,7 +69,7 @@ class jenkins::params { } 'Debian': { # common packages - $jdk_package = 'default-jdk' + $jdk_package = 'openjdk-7-jdk' $ccache_package = 'ccache' $python_netaddr_package = 'python-netaddr' # packages needed by slaves diff --git a/modules/jenkins/manifests/slave.pp b/modules/jenkins/manifests/slave.pp index 9130deeb84..35911b61e6 100644 --- a/modules/jenkins/manifests/slave.pp +++ b/modules/jenkins/manifests/slave.pp @@ -109,6 +109,11 @@ class jenkins::slave( ensure => present, } + package { 'openjdk-6-jre-headless': + ensure => purged, + require => Package[$::jenkins::params::jdk_package], + } + } default: { fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian or RedHat (slaves only).")