]> gitweb.fluxo.info Git - puppet-apache.git/commitdiff
Adding additional_directives parameter
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 6 Jun 2013 20:20:10 +0000 (17:20 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 6 Jun 2013 20:20:10 +0000 (17:20 -0300)
manifests/site.pp
templates/site.erb

index 6b923fb85c5fddce87526e11960d702c2be84229..f90bcbcaf400a9dbf5bea7fe7f64f0a2ea68754e 100644 (file)
@@ -1,34 +1,35 @@
 define apache::site(
-  $ensure               = present,
-  $docroot              = false,
-  $redirect             = false,
-  $redirect_match       = false,
-  $protocol             = 'http',
-  $aliases              = false,
-  $server_alias         = false,
-  $use                  = false,
-  $ticket               = false,
-  $source               = false,
-  $template             = 'apache/site.erb',
-  $filename             = '',
-  $manage_docroot       = true,
-  $owner                = 'root',
-  $group                = 'root',
-  $mpm                  = true,
-  $mpm_user             = '',
-  $mpm_group            = '',
-  $password             = '*',
-  $comment              = '',
-  $sshkey               = absent,
-  $groups               = '',
-  $shell                = '/bin/false',
-  $manage_user          = true,
-  $ssl                  = false,
-  $listen               = '*',
-  $https_redirect       = false,
-  $canonical            = false,
-  $canonical_exceptions = '',
-  $hidden_service       = false
+  $ensure                = present,
+  $docroot               = false,
+  $redirect              = false,
+  $redirect_match        = false,
+  $protocol              = 'http',
+  $aliases               = false,
+  $server_alias          = false,
+  $use                   = false,
+  $ticket                = false,
+  $source                = false,
+  $template              = 'apache/site.erb',
+  $filename              = '',
+  $manage_docroot        = true,
+  $owner                 = 'root',
+  $group                 = 'root',
+  $mpm                   = true,
+  $mpm_user              = '',
+  $mpm_group             = '',
+  $password              = '*',
+  $comment               = '',
+  $sshkey                = absent,
+  $groups                = '',
+  $shell                 = '/bin/false',
+  $manage_user           = true,
+  $ssl                   = false,
+  $listen                = '*',
+  $https_redirect        = false,
+  $canonical             = false,
+  $canonical_exceptions  = '',
+  $hidden_service        = false,
+  $additional_directives = false
 ) {
 
   $vhost = $filename ? {
index 911d97ada788b47595e74efec22358ee47796c12..aef58e0787d5babbb1c9f3be2368777408c5069d 100644 (file)
@@ -32,6 +32,7 @@
    RewriteCond %{HTTP_HOST}   !=<%= canonical %> [NC]
    RewriteCond %{HTTP_HOST}   !=""
    RewriteRule ^/(.*)         <%= protocol %>://<%= canonical %>/$1 [L,R=301]
+<%- if additional_directives != false -%><%= additional_directives %><%- end -%>
 <% end %>
 </VirtualHost>
 # end vhost for <%= title %>
@@ -49,6 +50,7 @@
 <% if use != false %><% use.each do |instance| -%>
    Use <%= instance %>
 <% end -%><% end -%>
+<%- if additional_directives != false -%><%= additional_directives %><%- end -%>
 <% if mpm == true %>
    <IfModule mpm_itk_module>
      AssignUserId <%= user %> <%= gid %>