From aaea548336e2b5c49828759d248e106cfc35f67b Mon Sep 17 00:00:00 2001 From: Tomas Joelsson Date: Wed, 14 Oct 2015 12:33:53 +0800 Subject: [PATCH 1/2] Add blacklist file option to opcache config --- defaults/main.yml | 1 + templates/opcache.ini.j2 | 1 + 2 files changed, 2 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 38822e2..7edb5e7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -22,6 +22,7 @@ php_opcache_max_wasted_percentage: "5" php_opcache_validate_timestamps: "1" php_opcache_revalidate_freq: "2" php_opcache_max_file_size: "0" +php_opcache_blacklist_filename: "" # APC settings (useful for PHP <5.5). php_enable_apc: true diff --git a/templates/opcache.ini.j2 b/templates/opcache.ini.j2 index f95a1a5..5c7128b 100644 --- a/templates/opcache.ini.j2 +++ b/templates/opcache.ini.j2 @@ -11,3 +11,4 @@ opcache.max_wasted_percentage={{ php_opcache_max_wasted_percentage }} opcache.validate_timestamps={{ php_opcache_validate_timestamps }} opcache.revalidate_freq={{ php_opcache_revalidate_freq }} opcache.max_file_size={{ php_opcache_max_file_size }} +opcache.blacklist_filename={{ php_opcache_blacklist_filename }} \ No newline at end of file From af9293214a25431299eec622d14d1d8c378dcbb5 Mon Sep 17 00:00:00 2001 From: Tomas Joelsson Date: Wed, 14 Oct 2015 14:23:27 +0800 Subject: [PATCH 2/2] Add if-condition for opcache blacklist filename --- templates/opcache.ini.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/opcache.ini.j2 b/templates/opcache.ini.j2 index 5c7128b..7328664 100644 --- a/templates/opcache.ini.j2 +++ b/templates/opcache.ini.j2 @@ -11,4 +11,6 @@ opcache.max_wasted_percentage={{ php_opcache_max_wasted_percentage }} opcache.validate_timestamps={{ php_opcache_validate_timestamps }} opcache.revalidate_freq={{ php_opcache_revalidate_freq }} opcache.max_file_size={{ php_opcache_max_file_size }} -opcache.blacklist_filename={{ php_opcache_blacklist_filename }} \ No newline at end of file +{% if php_opcache_blacklist_filename != '' %} +opcache.blacklist_filename={{ php_opcache_blacklist_filename }} +{% endif %}