-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
After applying the provision playbook fix from #151 and bringing up a vm without varnish, @weeirishman was still seeing PHP script changes be actively ignored short of an apache restart.
Though he is still investigating and ruling out other possible causes, we suspect it was a side effect of PHP 5.5's opcache, in which case this may bypass it for local stages (diff updated):
diff --git a/lib/ansible/roles/php/tasks/main.yml b/lib/ansible/roles/php/tasks/main.yml
index 5903c06..6da6767 100644
--- a/lib/ansible/roles/php/tasks/main.yml
+++ b/lib/ansible/roles/php/tasks/main.yml
@@ -33,3 +33,8 @@
- name: Update php.ini's upload_max_filesize
lineinfile: dest=/etc/php5/apache2/php.ini backup=yes regexp='^[;# ]*upload_max_filesize' line='upload_max_filesize = 16M'
sudo: yes
+
+- name: Update php.ini's opcache settings (on local stage only)
+ lineinfile: dest=/etc/php5/apache2/php.ini backup=yes regexp='^[;# ]*opcache[.]{{ item.key }}' line='opcache.{{ item.key }} = {{ item.value }}'
+ with_dict:
+ revalidate_freq: 0
+ consistency_checks: 1
+ when: 'local' == stage
+ sudo: yesOnce he confirms this is an opcache issue, I'll apply the above as a PR and get it tagged + released