Allow puppet to configure Gerrit's receive.maxObjectSizeLimit option

Setup puppet to schedule Gerrit's receive.maxObjectSizeLimit option[1]

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/
        2.11/config-gerrit.html#receive.maxObjectSizeLimit

Change-Id: Iad06bfc421ce73aeb1e1496f86cc244624599bec
This commit is contained in:
Khai Do
2015-12-30 12:31:36 -08:00
parent f7b9c992cd
commit 249e4b2314
2 changed files with 8 additions and 0 deletions

View File

@@ -101,6 +101,8 @@
# Number of threads to use for indexing in normal interactive operations
# allow_drafts:
# Set this to false to disable drafts feature
# receive_max_object_size_limit
# Maximum allowed Git object size that 'receive-pack' will accept.
# TODO: make more gerrit options configurable here
#
class gerrit(
@@ -184,6 +186,7 @@ class gerrit(
$index_threads = 1,
$new_groups_visible_to_all = true,
$allow_drafts = true,
$receive_max_object_size_limit = '',
) {
include ::httpd
@@ -353,6 +356,7 @@ class gerrit(
# - $index_threads:
# - $new_groups_visible_to_all:
# - $allow_drafts:
# - $receive_max_object_size_limit
file { '/home/gerrit2/review_site/etc/gerrit.config':
ensure => present,
owner => 'gerrit2',

View File

@@ -91,6 +91,10 @@
email = <%= @email %>
[change]
allowDrafts = <%= @allow_drafts %>
[receive]
<% if @receive_max_object_size_limit != "" -%>
maxObjectSizeLimit = <%= @receive_max_object_size_limit %>
<% end -%>
<% @commentlinks.each do |commentlink| -%>
[commentlink "<%= commentlink['name'] %>"]
match = "<%= commentlink['match'] %>"