Skip to content

Commit

Permalink
Merge pull request #483 from joshuaspence/clearenv
Browse files Browse the repository at this point in the history
Allow `clear_env` to be disabled
  • Loading branch information
bastelfreak authored Oct 20, 2018
2 parents 2cf2e1a + 4ada984 commit ad9e836
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions manifests/fpm/pool.pp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
# Hash of environment variables and values as strings to use in php
# scripts in this pool
#
# [*clear_env*]
# Whether the environment should be cleared.
#
# [*options*]
# An optional hash for any other data.
#
Expand Down Expand Up @@ -149,6 +152,7 @@
$include = undef,
$env = [],
$env_value = {},
$clear_env = true,
$options = {},
$php_value = {},
$php_flag = {},
Expand Down
4 changes: 4 additions & 0 deletions templates/fpm/pool.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ include=<%= @include %>
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp
<% if @clear_env -%>
<% @env.each do |var| -%>
env[<%= var %>] = $<%= var %>
<% end -%>
Expand All @@ -312,6 +313,9 @@ env[<%= var %>] = $<%= var %>
env[<%= key %>] = '<%= value %>'
<% end -%>
<% end -%>
<% else -%>
clear_env = no
<% end -%>

; Additional php.ini defines, specific to this pool of workers. These settings
; overwrite the values previously defined in the php.ini. The directives are the
Expand Down

0 comments on commit ad9e836

Please sign in to comment.