Merge "Use httpd::vhost $content parameter"

This commit is contained in:
Zuul 2018-07-20 18:06:10 +00:00 committed by Gerrit Code Review
commit 2c87234ddd
2 changed files with 10 additions and 5 deletions

View File

@ -14,11 +14,16 @@ define meetbot::site(
$varlib = "/var/lib/meetbot/${name}"
$meetbot = "/srv/meetbot-${name}"
$port = 80
$docroot = "/srv/meetbot-${name}"
$srvname = $vhost_name
$_vhost_name = '*'
$options = 'Indexes FollowSymLinks MultiViews'
::httpd::vhost { $vhost_name:
port => 80,
docroot => "/srv/meetbot-${name}",
priority => '50',
template => 'meetbot/vhost.erb',
content => template('meetbot/vhost.erb'),
}
file { $varlib:

View File

@ -2,8 +2,8 @@
# Managed by Puppet
# ************************************
NameVirtualHost <%= @vhost_name %>:<%= @port %>
<VirtualHost <%= @vhost_name %>:<%= @port %>>
NameVirtualHost <%= @_vhost_name %>:<%= @port %>
<VirtualHost <%= @_vhost_name %>:<%= @port %>>
ServerName <%= @srvname %>
<% if @serveraliases.is_a? Array -%>
<% @serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%>
@ -27,8 +27,8 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
<%= @vhost_extra %>
ErrorLog /var/log/apache2/<%= @name %>_error.log
ErrorLog /var/log/apache2/<%= @srvname %>_error.log
LogLevel warn
CustomLog /var/log/apache2/<%= @name %>_access.log combined
CustomLog /var/log/apache2/<%= @srvname %>_access.log combined
ServerSignature Off
</VirtualHost>