Allow puppet to configure Gerrit's canonicalGitUrl option

Gerrit 2.11 has a gerrit.canonicalWebUrl[1] option that will display
an alternative git repo location to users using the git protocol.

[1] https://review.openstack.org/Documentation/
          config-gerrit.html#gerrit.canonicalGitUrl

Change-Id: I5bd57d91b4d4a685328efe4d589a191debaa0fe5
This commit is contained in:
Khai Do 2016-04-01 09:45:59 -07:00
parent 6b4228cf4b
commit 4edbd2a8fa
2 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,8 @@
# eg., https://review.example.com/
# git_http_url:
# Optional base URL for repositories available over the HTTP protocol
# canonical_git_url:
# URL for repositories available over the anonymous git protocol
# ssl_cert_file:
# ssl_key_file:
# Used in the Apache virtual host to specify the SSL cert and key files.
@ -130,6 +132,7 @@ class gerrit(
$redirect_to_canonicalweburl = true,
$canonicalweburl = "https://${::fqdn}/",
$git_http_url = '',
$canonical_git_url = '',
$robots_txt_source = '', # If left empty, the gerrit default will be used.
$serveradmin = "webmaster@${::fqdn}",
$ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem',
@ -342,6 +345,7 @@ class gerrit(
# - $mysql_host
# - $canonicalweburl
# - $git_http_url
# - $canonical_git_url
# - $smtpserver
# - $sendemail_from
# - $sendemail_include_diff

View File

@ -10,6 +10,9 @@
<% if @git_http_url != "" -%>
gitHttpUrl = <%= @git_http_url %>
<% end -%>
<% if @canonical_git_url != "" -%>
canonicalGitUrl = <%= @canonical_git_url %>
<% end -%>
[database]
type = MYSQL
hostname = <%= @mysql_host %>