From acf4ad266a458e00efb80a35ace6dc919e78b2e8 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sun, 12 Nov 2017 18:40:15 +0000 Subject: [PATCH] php opcache --- tasks/main.yml | 2 ++ tasks/php-opcache.yml | 8 ++++++++ templates/php-opcache.conf.j2 | 7 +++++++ 3 files changed, 17 insertions(+) create mode 100644 tasks/php-opcache.yml create mode 100644 templates/php-opcache.conf.j2 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