This commit is contained in:
Jonathan Piron 2024-05-15 18:10:45 +02:00 committed by GitHub
commit b4040f3b28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 10 deletions

View File

@ -1,14 +1,7 @@
zend_extension={{ php_opcache_zend_extension }}
opcache.enable={{ php_opcache_enable }}
opcache.enable_cli={{ php_opcache_enable_cli }}
opcache.memory_consumption={{ php_opcache_memory_consumption }}
opcache.interned_strings_buffer={{ php_opcache_interned_strings_buffer }}
opcache.max_accelerated_files={{ php_opcache_max_accelerated_files }}
opcache.max_wasted_percentage={{ php_opcache_max_wasted_percentage }}
opcache.validate_timestamps={{ php_opcache_validate_timestamps }}
opcache.revalidate_path={{ php_opcache_revalidate_path }}
opcache.revalidate_freq={{ php_opcache_revalidate_freq }}
opcache.max_file_size={{ php_opcache_max_file_size }}
{% for key, var in opcache_vars.items() %}
opcache.{{ key }}={{ var }}
{% endfor %}
{% if php_opcache_blacklist_filename != '' %}
opcache.blacklist_filename={{ php_opcache_blacklist_filename }}
{% endif %}

13
vars/main.yml Normal file
View File

@ -0,0 +1,13 @@
__opcache_var_names: "{{ lookup('varnames',
'^php_opcache_(?!(zend_extension|conf_filename|blacklist_filename)).*$',
wantlist=True) }}"
__opcache_var_values: "{{ lookup('vars',
*__opcache_var_names,
wantlist=True) }}"
opcache_vars: "{{ __opcache_var_names
| map('regex_replace', '^(php_opcache_)', '')
| map('community.general.dict_kv', 'key')
| zip(__opcache_var_values
| map('community.general.dict_kv', 'value'))
| map('combine')
| items2dict }}"