fix pool.conf template in case some VARs are not defined (#20)

vars not defined in defaults should be processed only if they are defined (avoid AnsibleUndefinedVariable errors)

Co-authored-by: Klaus Zerwes <Klaus.Zerwes@rosalux.org>
master 2.6.3
Klaus Zerwes 2022-11-07 17:22:57 +01:00 committed by GitHub
parent b4afb45dd4
commit 746b05ca4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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