Allow puppet to configure the Gerrit drafts feature
In Gerrit 2.11 disabling draft pushes in gerrit ACLS was not enough to disable the drafts feature. There is now a change.allowDrafts [1] settting in gerrit.config to disable drafts which also needs to be set. This change allows puppet configure this setting. [1] https://review-dev.openstack.org/Documentation/config-gerrit.html#change Change-Id: Iea970a85d433d8707102a3dcaf8cbae2d5662b6e
This commit is contained in:
@@ -99,6 +99,8 @@
|
||||
# The number of threads to use for full offline reindexing of Gerrit data
|
||||
# index_threads:
|
||||
# Number of threads to use for indexing in normal interactive operations
|
||||
# allow_drafts:
|
||||
# Set this to false to disable drafts feature
|
||||
# TODO: make more gerrit options configurable here
|
||||
#
|
||||
class gerrit(
|
||||
@@ -181,6 +183,7 @@ class gerrit(
|
||||
$report_bug_url = '',
|
||||
$index_threads = 1,
|
||||
$new_groups_visible_to_all = true,
|
||||
$allow_drafts = true,
|
||||
) {
|
||||
include ::httpd
|
||||
|
||||
@@ -349,6 +352,7 @@ class gerrit(
|
||||
# - $reindex_threads:
|
||||
# - $index_threads:
|
||||
# - $new_groups_visible_to_all:
|
||||
# - $allow_drafts:
|
||||
file { '/home/gerrit2/review_site/etc/gerrit.config':
|
||||
ensure => present,
|
||||
owner => 'gerrit2',
|
||||
|
||||
@@ -89,6 +89,8 @@
|
||||
maxAge = 1d
|
||||
[user]
|
||||
email = <%= @email %>
|
||||
[change]
|
||||
allowDrafts = <%= @allow_drafts %>
|
||||
<% @commentlinks.each do |commentlink| -%>
|
||||
[commentlink "<%= commentlink['name'] %>"]
|
||||
match = "<%= commentlink['match'] %>"
|
||||
|
||||
Reference in New Issue
Block a user