nginx/php-fpm: Added configuration for php opcache

wip
Felix Stupp 5 years ago
parent c25df42253
commit 964099cfdb
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -5,6 +5,7 @@ php_version: "{{ (ansible_distribution_major_version >= '10') | ternary('7.3', '
phpfpm_package: "php{{ php_version }}-fpm" phpfpm_package: "php{{ php_version }}-fpm"
phpfpm_configuration_directory: "/etc/php/{{ php_version }}/fpm" phpfpm_configuration_directory: "/etc/php/{{ php_version }}/fpm"
phpfpm_configuration: "{{ phpfpm_configuration_directory }}/php-fpm.conf" phpfpm_configuration: "{{ phpfpm_configuration_directory }}/php-fpm.conf"
phpfpm_php_ini: "{{ phpfpm_configuration_directory }}/php.ini"
phpfpm_pools_directory: "{{ phpfpm_configuration_directory }}/pool.d" phpfpm_pools_directory: "{{ phpfpm_configuration_directory }}/pool.d"
phpfpm_sockets_directory: "/var/run/php-pools" phpfpm_sockets_directory: "/var/run/php-pools"

@ -19,6 +19,18 @@
group: root group: root
mode: "u=rwx,g=rx,o=rx" mode: "u=rwx,g=rx,o=rx"
# - name: Configure php-fpm
#- name: Configure php-fpm lineinfile:
# notify: "reload php-fpm" path: "{{ phpfpm_php_ini }}"
state: present
regexp: "^;?{{ item.key | regex_escape() }}="
line: "{{ item.key }}={{ item.value }}"
with_dict:
opcache.enable: 1
opcache.enable_cli: 1
opcache.memory_consumption: 128
opcache.interned_strings_buffer: 8
opcache.max_accelerated_files: 10000
opcache.revalidate_freq: 1
opcache.save_comments: 1
notify: reload php-fpm

Loading…
Cancel
Save