Add serveraliases to cgit vhost template
Allow for specifying ServerAlias entries in the apache vhost for the cgit puppet module. (vhost template section lifted from the puppetlabs-apache v0.0.4 vhost-default template). Change-Id: If7c297247b9556458154e4d01a1e0165a25a14b5
This commit is contained in:
parent
dc8b2ae79f
commit
e39b5ce777
@ -17,6 +17,7 @@
|
||||
class cgit(
|
||||
$vhost_name = $::fqdn,
|
||||
$serveradmin = "webmaster@${::fqdn}",
|
||||
$serveraliases = '',
|
||||
$cgitdir = '/var/www/cgit',
|
||||
$staticfiles = '/var/www/cgit/static',
|
||||
$ssl_cert_file = '',
|
||||
@ -116,12 +117,13 @@ class cgit(
|
||||
}
|
||||
|
||||
apache::vhost { $vhost_name:
|
||||
port => $https_port,
|
||||
docroot => 'MEANINGLESS ARGUMENT',
|
||||
priority => '50',
|
||||
template => 'cgit/git.vhost.erb',
|
||||
ssl => true,
|
||||
require => [
|
||||
port => $https_port,
|
||||
serveraliases => $serveraliases,
|
||||
docroot => 'MEANINGLESS ARGUMENT',
|
||||
priority => '50',
|
||||
template => 'cgit/git.vhost.erb',
|
||||
ssl => true,
|
||||
require => [
|
||||
File[$staticfiles],
|
||||
Package['cgit'],
|
||||
],
|
||||
|
@ -2,6 +2,12 @@
|
||||
ServerName <%= scope.lookupvar("cgit::vhost_name") %>
|
||||
ServerAdmin <%= scope.lookupvar("cgit::serveradmin") %>
|
||||
|
||||
<% if serveraliases.is_a? Array -%>
|
||||
<% serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%>
|
||||
<% elsif serveraliases != '' -%>
|
||||
<%= " ServerAlias #{serveraliases}" -%>
|
||||
<% end -%>
|
||||
|
||||
Alias /cgit-data /usr/share/cgit
|
||||
ScriptAlias /cgit /var/www/cgi-bin/cgit
|
||||
Alias /static <%= scope.lookupvar("cgit::staticfiles") %>
|
||||
@ -27,6 +33,12 @@
|
||||
ServerName <%= scope.lookupvar("cgit::vhost_name") %>
|
||||
ServerAdmin <%= scope.lookupvar("cgit::serveradmin") %>
|
||||
|
||||
<% if serveraliases.is_a? Array -%>
|
||||
<% serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%>
|
||||
<% elsif serveraliases != '' -%>
|
||||
<%= " ServerAlias #{serveraliases}" -%>
|
||||
<% end -%>
|
||||
|
||||
Alias /cgit-data /usr/share/cgit
|
||||
ScriptAlias /cgit /var/www/cgi-bin/cgit
|
||||
Alias /static <%= scope.lookupvar("cgit::staticfiles") %>
|
||||
|
Loading…
Reference in New Issue
Block a user