Make gitweb a boolean option.

Change-Id: Iff55f35c0d9888f1029115c17d4644a68d4e8b4c
Reviewed-on: https://review.openstack.org/10727
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Monty Taylor 2012-08-02 12:57:15 -05:00 committed by Jenkins
parent 9450c735a2
commit e63619e980
2 changed files with 12 additions and 2 deletions

View File

@ -46,6 +46,8 @@
# A boolean enabling replication to github # A boolean enabling replication to github
# replicate_local: # replicate_local:
# A boolean enabling local replication for apache acceleration # A boolean enabling local replication for apache acceleration
# gitweb:
# A boolean enabling gitweb
# testmode: # testmode:
# Set this to true to disable cron jobs and replication, # Set this to true to disable cron jobs and replication,
# which can interfere with testing. # which can interfere with testing.
@ -80,6 +82,7 @@ class gerrit($virtual_hostname=$fqdn,
$replicate_local=true, $replicate_local=true,
$local_git_dir='/var/lib/git', $local_git_dir='/var/lib/git',
$replication_targets=[], $replication_targets=[],
$gitweb=true,
$testmode=false $testmode=false
) { ) {
@ -106,8 +109,13 @@ class gerrit($virtual_hostname=$fqdn,
ensure => present ensure => present
} }
$packages = ["gitweb", if ($gitweb) {
"openjdk-6-jre-headless"] package { "gitweb":
ensure => present
}
}
$packages = ["openjdk-6-jre-headless"]
package { $packages: package { $packages:
ensure => present, ensure => present,

View File

@ -78,5 +78,7 @@
[melody] [melody]
monitoring = <%= enable_melody %> monitoring = <%= enable_melody %>
session = <%= melody_session %> session = <%= melody_session %>
<% if gitweb -%>
[gitweb] [gitweb]
revision = "?p=${project}.git;a=commitdiff;h=${commit}" revision = "?p=${project}.git;a=commitdiff;h=${commit}"
<% end -%>