Skip to content

Commit

Permalink
fix pool.conf template in case some VARs are not defined (#20)
Browse files Browse the repository at this point in the history
vars not defined in defaults should be processed only if they are defined (avoid AnsibleUndefinedVariable errors)

Co-authored-by: Klaus Zerwes <[email protected]>
  • Loading branch information
zerwes and Klaus Zerwes authored Nov 7, 2022
1 parent b4afb45 commit 746b05c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/etc/__php__/fpm/pool.d/pool.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,19 @@ catch_workers_output = {{ item.catch_workers_output | default('no') }}
;php_admin_value[error_log] = /var/log/fpm-php.www.log
;php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 32M
{% if item.php_env is defined %}
{% for k, v in item.php_env.items() | list %}
env[{{ k }}] = {{ v }}
{% endfor %}
{% endif %}
{% if item.php_value is defined %}
{% for k, v in item.php_value.items() | list %}
php_value[{{ k }}] = {{ v }}
{% endfor %}
{% endif %}
{% if item.php_admin_value is defined %}
{% for k, v in item.php_admin_value.items() | list %}
php_admin_value[{{ k }}] = {{ v }}
{% endfor %}
{% endif %}
; vim:filetype=dosini

0 comments on commit 746b05c

Please sign in to comment.