Allow puppet to configure Gerrit's download protocols
Gerrit 2.11 has a download[1] option that allows customization of download commands and schemes. Allow puppet to configure this so we can customize it. [1] https://review.openstack.org/Documentation/config-gerrit.html#download Change-Id: Ia6a3a28cce62b6bd1570fd0ab5b1224fc35d8284
This commit is contained in:
parent
6b4228cf4b
commit
6f42cb9dc0
|
@ -118,6 +118,15 @@
|
|||
# Set this to false to disable drafts feature
|
||||
# receive_max_object_size_limit
|
||||
# Maximum allowed Git object size that 'receive-pack' will accept.
|
||||
# download:
|
||||
# The allowed download commands and schemes. The data structor for this
|
||||
# should be a hash with keys and array of values (i.e. {key => [values]})
|
||||
# Example:
|
||||
# download => {
|
||||
# 'command' => ['checkout', 'cherry_pick', 'pull', 'format_patch'],
|
||||
# 'scheme' => ['ssh', 'anon_http', 'anon_git'],
|
||||
# 'archive' => ['tar', 'tbz2', 'tgz', 'txz'],
|
||||
# },
|
||||
# TODO: make more gerrit options configurable here
|
||||
#
|
||||
class gerrit(
|
||||
|
@ -212,6 +221,7 @@ class gerrit(
|
|||
$receive_max_object_size_limit = '',
|
||||
$cache_diff_timeout = '',
|
||||
$cache_diff_intraline_timeout = '',
|
||||
$download = {},
|
||||
) {
|
||||
include ::httpd
|
||||
|
||||
|
@ -394,6 +404,7 @@ class gerrit(
|
|||
# - $receive_max_object_size_limit
|
||||
# - $cache_diff_timeout
|
||||
# - $cache_diff_intraline_timeout
|
||||
# - $download
|
||||
|
||||
file { '/home/gerrit2/review_site/etc/gerrit.config':
|
||||
ensure => present,
|
||||
|
|
|
@ -180,6 +180,14 @@
|
|||
threads = <%= @index_threads %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% unless @download.empty? -%>
|
||||
[download]
|
||||
<% @download.each do |key, item| -%>
|
||||
<% item.each do |value| -%>
|
||||
<%= key %> = <%= value %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
[groups]
|
||||
newGroupsVisibleToAll = <%= @new_groups_visible_to_all %>
|
||||
[mimetype "image/*"]
|
||||
|
|
Loading…
Reference in New Issue