8000 Switching to instance variables · guillemcanal/puppet-php@3420186 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3420186

Browse files
committed
Switching to instance variables
Newer versions of puppet generate a warning when accessing variables in templates without the '@'.
1 parent 82b2062 commit 3420186

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

templates/fpm-pool.conf.erb

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
; Start a new pool named '<%= name %>'.
1+
; Start a new pool named '<%= @name %>'.
22
; the variable $pool can be used in any directive and will be replaced by the
3-
; pool name ('<%= name %>' here)
4-
[<%= name %>]
3+
; pool name ('<%= @name %>' here)
4+
[<%= @name %>]
55

66
; Per pool prefix
77
; It only applies on the following directives:
@@ -15,15 +15,15 @@
1515
; Note: This directive can also be relative to the global prefix.
1616
; Default Value: none
1717
<% if @pool_prefix -%>
18-
prefix = <%= pool_prefix %>
18+
prefix = <%= @pool_prefix %>
1919
<% end -%>
2020

2121
; Unix user/group of processes
2222
; Note: The user is mandatory. If the group is not set, the default user's group
2323
; will be used.
24-
user = <%= user %>
24+
user = <%= @user %>
2525
<% if @group -%>
26-
group = <%= group %>
26+
group = <%= @group %>
2727
<% end -%>
2828

2929
; The address on which to accept FastCGI requests.
@@ -34,39 +34,39 @@ group = <%= group %>
3434
; specific port;
3535
; '/path/to/unix/socket' - to listen on a unix socket.
3636
; Note: This value is mandatory.
37-
listen = <%= listen %>
37+
listen = <%= @listen %>
3838

3939
<% if @listen_backlog -%>
4040
; Set listen(2) backlog. A value of '-1' means unlimited.
4141
; Default Value: 128 (-1 on FreeBSD and OpenBSD)
42-
listen.backlog = <%= listen_backlog %>
42+
listen.backlog = <%= @listen_backlog %>
4343
<% end -%>
4444

45-
<% if listen_type == 'socket' -%>
45+
<% if @listen_type == 'socket' -%>
4646
; Set permissions for unix socket, if one is used. In Linux, read/write
4747
; permissions must be set in order to allow connections from a web server. Many
4848
; BSD-derived systems allow connections regardless of permissions.
4949
; Default Values: user and group are set as the running user
5050
; mode is set to 0666
5151
<% if @socket_owner -%>
52-
listen.owner = <%= socket_owner %>
52+
listen.owner = <%= @socket_owner %>
5353
<% end -%>
5454
<% if @socket_group -%>
55-
listen.group = <%= socket_group %>
55+
listen.group = <%= @socket_group %>
5656
<% end -%>
5757
<% if @socket_mode -%>
58-
listen.mode = <%= socket_mode %>
58+
listen.mode = <%= @socket_mode %>
5959
<% end -%>
6060
<% end -%>
6161

62-
<% if listen_type == 'tcp' and @allowed_clients -%>
62+
<% if @listen_type == 'tcp' and @allowed_clients -%>
6363
; List of ipv4 addresses of FastCGI clients which are allowed to connect.
6464
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
6565
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
6666
; must be separated by a comma. If this value is left blank, connections will be
6767
; accepted from any ip address.
6868
; Default Value: any
69-
listen.allowed_clients = <%= allowed_clients %>
69+
listen.allowed_clients = <%= @allowed_clients %>
7070
<% end -%>
7171

7272
; Choose how the process manager will control the number of child processes.
@@ -93,7 +93,7 @@ listen.allowed_clients = <%= allowed_clients %>
9393
; pm.process_idle_timeout - The number of seconds after which
9494
; an idle process will be killed.
9595
; Note: This value is mandatory.
96-
pm = <%= pm %>
96+
pm = <%= @pm %>
9797

9898
; The number of child processes to be created when pm is set to 'static' and the
9999
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
@@ -104,38 +104,38 @@ pm = <%= pm %>
104104
; forget to tweak pm.* to fit your needs.
105105
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
106106
; Note: This value is mandatory.
107-
pm.max_children = <%= pm_max_children %>
107+
pm.max_children = <%= @pm_max_children %>
108108

109-
<% if pm == 'dynamic' -%>
109+
<% if @pm == 'dynamic' -%>
110110
; The number of child processes created on startup.
111111
; Note: Used only when pm is set to 'dynamic'
112112
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
113-
pm.start_servers = <%= pm_start_servers %>
113+
pm.start_servers = <%= @pm_start_servers %>
114114

115115
; The desired minimum number of idle server processes.
116116
; Note: Used only when pm is set to 'dynamic'
117117
; Note: Mandatory when pm is set to 'dynamic'
118-
pm.min_spare_servers = <%= pm_min_spare_servers %>
118+
pm.min_spare_servers = <%= @pm_min_spare_servers %>
119119

120120
; The desired maximum number of idle server processes.
121121
; Note: Used only when pm is set to 'dynamic'
122122
; Note: Mandatory when pm is set to 'dynamic'
123-
pm.max_spare_servers = <%= pm_max_spare_servers %>
123+
pm.max_spare_servers = <%= @pm_max_spare_servers %>
124124
<% end -%>
125125

126-
<% if pm == 'ondemand' -%>
126+
<% if @pm == 'ondemand' -%>
127127
; The number of seconds after which an idle process will be killed.
128128
; Note: Used only when pm is set to 'ondemand'
129129
; Default Value: 10s
130-
pm.process_idle_timeout = <%= pm_process_idle_timeout %>
130+
pm.process_idle_timeout = <%= @pm_process_idle_timeout %>
131131
<% end -%>
132132

133133
<% if @pm_max_requests -%>
134134
; The number of requests each child process should execute before respawning.
135135
; This can be useful to work around memory leaks in 3rd party libraries. For
136136
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
137137
; Default Value: 0
138-
pm.max_requests = <%= pm_max_requests %>
138+
pm.max_requests = <%= @pm_max_requests %>
139139
<% end -%>
140140

141141
<% if @pm_status_path -%>
@@ -236,7 +236,7 @@ pm.max_requests = <%= pm_max_requests %>
236236
; anything, but it may not be a good idea to use the .php extension or it
237237
; may conflict with a real PHP file.
238238
; Default Value: not set
239-
pm.status_path = <%= pm_status_path %>
239+
pm.status_path = <%= @pm_status_path %>
240240
<% end -%>
241241

242242
<% if @ping_path -%>
@@ -250,20 +250,20 @@ pm.status_path = <%= pm_status_path %>
250250
; anything, but it may not be a good idea to use the .php extension or it
251251
; may conflict with a real PHP file.
252252
; Default Value: not set
253-
ping.path = <%= ping_path %>
253+
ping.path = <%= @ping_path %>
254254

255255
<% if @ping_response -%>
256256
; This directive may be used to customize the response of a ping request. The
257257
; response is formatted as text/plain with a 200 response code.
258258
; Default Value: pong
259-
ping.response = <%= ping_response %>
259+
ping.response = <%= @ping_response %>
260260
<% end -%>
261261
<% end -%>
262262

263263
<% if @access_log -%>
264264
; The access log file
265265
; Default: not set
266-
access.log = <%= access_log %>
266+
access.log = <%= @access_log %>
267267

268268
<% if @access_log_format -%>
269269
; The access log format.
@@ -319,30 +319,30 @@ access.log = <%= access_log %>
319319
; %u: remote user
320320
;
321321
; Default: "%R - %u %t \"%m %r\" %s"
322-
access.format = <%= access_log_format %>
322+
access.format = <%= @access_log_format %>
323323
<% end -%>
324324
<% end -%>
325325

326326
<% if @slowlog -%>
327327
; The log file for slow requests
328328
; Default Value: not set
329329
; Note: slowlog is mandatory if request_slowlog_timeout is set
330-
slowlog = <%= slowlog %>
330+
slowlog = <%= @slowlog %>
331331

332332
; The timeout for serving a single request after which a PHP backtrace will be
333333
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
334334
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
335335
; Default Value: 0
336-
request_slowlog_timeout = <%= slowlog_timeout %>
336+
request_slowlog_timeout = <%= @slowlog_timeout %>
337337
<% end -%>
338338

339339
; The timeout for serving a single request after which the worker process will
340340
; be killed. This option should be used when the 'max_execution_time' ini option
341341
; does not stop script execution for some reason. A value of '0' means 'off'.
342342
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
343343
; Default Value: 0
344-
request_terminate_timeout = <%= terminate_timeout %>
345344

345+
request_terminate_timeout = <%= @terminate_timeout %>
346346
; Set open file descriptor rlimit.
347347
; Default Value: system defined value
348348
;rlimit_files = 1024
@@ -362,7 +362,7 @@ request_terminate_timeout = <%= terminate_timeout %>
362362
; possible. However, all PHP paths will be relative to the chroot
363363
; (error_log, sessions.save_path, ...).
364364
; Default Value: not set
365-
chroot = <%= chroot %>
365+
chroot = <%= @chroot %>
366366
<% end -%>
367367

368368
; Chdir to this directory at the start.
@@ -394,7 +394,7 @@ chdir = /
394394
;env[TMPDIR] = /tmp
395395
;env[TEMP] = /tmp
396396
<% if @env_settings -%>
397-
<% env_settings.each do |env_setting| -%>
397+
<% @env_settings.each do |env_setting| -%>
398398
<%= env_setting %>
399399
<% end -%>
400400
<% end -%>
@@ -424,7 +424,7 @@ chdir = /
424424
;php_admin_value[error_log] = /var/log/fpm-php.www.log
425425
;php_admin_flag[log_errors] = on
426426
;php_admin_value[memory_limit] = 32M
427-
<% php_settings.each do |php_setting| -%>
427+
<% @php_settings.each do |php_setting| -%>
428428
<%= php_setting %>
429429
<% end -%>
430430
<% end -%>

0 commit comments

Comments
 (0)
0