Refactor to accept java_home from parent modules
The java_home is needed in review.pp and review-dev.pp (in system-config) so instead of defining it in here allow a parent module to pass in the value. Change-Id: I5e817fab8a8973b688fd44dd819e3616df171321
This commit is contained in:
parent
1eefbbb653
commit
0b209db93b
|
@ -127,6 +127,8 @@
|
|||
# 'scheme' => ['ssh', 'anon_http', 'anon_git'],
|
||||
# 'archive' => ['tar', 'tbz2', 'tgz', 'txz'],
|
||||
# },
|
||||
# java_home:
|
||||
# The path to java home directory
|
||||
# TODO: make more gerrit options configurable here
|
||||
#
|
||||
class gerrit(
|
||||
|
@ -222,6 +224,7 @@ class gerrit(
|
|||
$cache_diff_timeout = '',
|
||||
$cache_diff_intraline_timeout = '',
|
||||
$download = {},
|
||||
$java_home = '/usr/lib/jvm/java-7-openjdk-amd64/jre',
|
||||
) {
|
||||
include ::httpd
|
||||
|
||||
|
@ -230,11 +233,6 @@ class gerrit(
|
|||
}
|
||||
include ::pip
|
||||
|
||||
$java_home = $::lsbdistcodename ? {
|
||||
'precise' => '/usr/lib/jvm/java-7-openjdk-amd64/jre',
|
||||
'trusty' => '/usr/lib/jvm/java-7-openjdk-amd64/jre',
|
||||
}
|
||||
|
||||
# get the war version from the passed in url, expecting something like
|
||||
# http://tarballs.openstack.org/ci/gerrit/gerrit-v2.10.2.22.acc615e.war
|
||||
$split1 = split($war, '/')
|
||||
|
|
|
@ -21,6 +21,7 @@ class { '::gerrit::mysql':
|
|||
}
|
||||
|
||||
class { '::gerrit':
|
||||
java_home => '/usr/lib/jvm/java-7-openjdk-amd64/jre',
|
||||
mysql_host => 'localhost',
|
||||
mysql_password => '12345',
|
||||
war => 'http://tarballs.openstack.org/ci/test/gerrit-v2.11.4.13.cb9800e.war',
|
||||
|
|
|
@ -48,7 +48,9 @@
|
|||
includeDiff = <%= @sendemail_include_diff %>
|
||||
[container]
|
||||
user = gerrit2
|
||||
<% if @java_home != "" -%>
|
||||
javaHome = <%= @java_home %>
|
||||
<% end -%>
|
||||
<% if @container_javaoptions != "" -%>
|
||||
javaOptions = <%= @container_javaoptions %>
|
||||
<% end -%>
|
||||
|
|
Loading…
Reference in New Issue