diff --git a/manifests/init.pp b/manifests/init.pp index d624e12..1d6efb4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -107,6 +107,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( @@ -193,6 +195,7 @@ class gerrit( $index_threads = 1, $new_groups_visible_to_all = true, $allow_drafts = true, + $receive_max_object_size_limit = '', ) { include ::httpd @@ -367,6 +370,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', diff --git a/templates/gerrit.config.erb b/templates/gerrit.config.erb index c9694a6..69dd5dc 100644 --- a/templates/gerrit.config.erb +++ b/templates/gerrit.config.erb @@ -99,6 +99,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'] %>"