diff --git a/tasks/main.yml b/tasks/main.yml index e1eb458..d0ba92e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,6 +2,8 @@ - include: setup_Debian.yml +- include: php-opcache.yml + - include: reset.yml when: nextcloud_state == "reinstalled" diff --git a/tasks/php-opcache.yml b/tasks/php-opcache.yml new file mode 100644 index 0000000..f81c6d5 --- /dev/null +++ b/tasks/php-opcache.yml @@ -0,0 +1,8 @@ + +--- + +- name: enable php opcache + template: + src: php-opcache.conf.j2 + dest: /etc/php/7.0/apache2/conf.d/opcache.ini + notify: restart apache2 diff --git a/templates/php-opcache.conf.j2 b/templates/php-opcache.conf.j2 new file mode 100644 index 0000000..104f242 --- /dev/null +++ b/templates/php-opcache.conf.j2 @@ -0,0 +1,7 @@ +opcache.enable=1 +opcache.enable_cli=1 +opcache.interned_strings_buffer=8 +opcache.max_accelerated_files=10000 +opcache.memory_consumption=128 +opcache.save_comments=1 +opcache.revalidate_freq=1