File: workers.properties.epp

package info (click to toggle)
puppet-module-puppetlabs-apache 12.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,664 kB
  • sloc: ruby: 275; sh: 32; makefile: 2
file content (62 lines) | stat: -rw-r--r-- 2,290 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# This file is generated automatically by Puppet - DO NOT EDIT
# Any manual changes will be overwritten
<%# -%>
<%# workers_file_content should be a hash which keys are workers names -%>
<%# and values are new hashes with properties and values -%>
<%# Two keys are special (and reserved!): -%>
<%# worker_lists - Array of comma-separated worker names lists -%>
<%# Each list is an item of the array and will be placed in one line -%>
<%# worker_maintain - Numeric string -%>
<%# -%>
<%# Example: -%>
<%# worker.list = status -%>
<%# worker.list = some_name,other_name -%>
<%# worker.maintain = 60 -%>
<%# # Optional comment -%>
<%# worker.some_name.type=ajp13 -%>
<%# worker.some_name.socket_keepalive=true -%>
<%# # I just like comments -%>
<%# worker.other_name.type=ajp12 (why would you?) -%>
<%# worker.other_name.socket_keepalive=false -%>
<%# -%>
<%# should be parameterized as: -%>
<%# $workers_file_content = { -%>
<%#   worker_lists    => ['status', 'some_name,other_name'], -%>
<%#   worker_maintain => '60', -%>
<%#   some_name       => { -%>
<%#     type             => 'ajp13', -%>
<%#     socket_keepalive => 'true', -%>
<%#     comment          => 'Optional comment', -%>
<%#   }, -%>
<%#   other_name      => { -%>
<%#     type             => 'ajp12', -%>
<%#     socket_keepalive => 'false', -%>
<%#     comment          => 'I just like comments', -%>
<%#   }, -%>
<%# }, -%>
<%# -%>
<% if $workers_file_content['worker_lists'] { -%>

<% $workers_file_content['worker_lists'].sort.each |$list| { -%>
worker.list = <%= $list %>
<% } -%>
<% } -%>
<% if $workers_file_content['worker_maintain'] { -%>

worker.maintain = <%= $workers_file_content['worker_maintain'] %>
<% } -%>
<% Array($workers_file_content).sort.each |$name_and_directives| { -%>
<%# Skip hash items with the reserved keys -%>
<% if !($name_and_directives[0] in ['worker_lists', 'worker_maintain']) { -%>

<%# Places comment before worker directives -%>
<% if $name_and_directives[1]['comment'] { -%>
# <%= $name_and_directives[1]['comment'] %>
<% } -%>
<% Array($name_and_directives[1]).sort.each |$property_and_value| { -%>
<% if $property_and_value[0] != 'comment' { -%>
worker.<%= $name_and_directives[0] %>.<%= $property_and_value[0] %>=<%= $property_and_value[1] %>
<% } -%>
<% } -%>
<% } -%>
<% } -%>