annotate modules/apache/templates/vhost/_access_log.erb @ 36:37675581a273 puppet-3.6

Update Puppet module for Apache (pulls in concat module)
author IBBoard <dev@ibboard.co.uk>
date Sat, 14 Mar 2015 20:07:04 +0000
parents
children 675c1cc61eaf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 <% @_access_logs.each do |log| -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 <% env ||= "env=#{log['env']}" if log['env'] -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 <% env ||= '' -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 <% format ||= "\"#{log['format']}\"" if log['format'] -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 <% format ||= 'combined' -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 <% if log['file'] -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 <% if log['file'].chars.first == '/' -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 <% destination = "#{log['file']}" -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 <% else -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 <% destination = "#{@logroot}/#{log['file']}" -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 <% end -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 <% elsif log['syslog'] -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 <% destination = "syslog" -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 <% elsif log['pipe'] -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 <% destination = log['pipe'] -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 <% else -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 <% destination ||= "#{@logroot}/#{@name}_access_ssl.log" if @ssl -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 <% destination ||= "#{@logroot}/#{@name}_access.log" -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 <% end -%>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 CustomLog "<%= destination %>" <%= format %> <%= env %>
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 <% end -%>