Skip to content

Commit

Permalink
Merge pull request #38 from mglaman/remove-php-role-soft-dependency
Browse files Browse the repository at this point in the history
Add handler to clear opcache
  • Loading branch information
geerlingguy authored Apr 20, 2017
2 parents c77c6a3 + 5f42653 commit 45d1a01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: clear opcache
command: "{{ drush_path }} eval \"if (function_exists('apc_clear_cache')) {apc_clear_cache();}if (function_exists('opcache_reset')) {opcache_reset();}\""
args:
chdir: "{{ drupal_core_path }}"
2 changes: 1 addition & 1 deletion tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
dest: "{{ drupal_deploy_dir }}"
accept_hostkey: "{{ drupal_deploy_accept_hostkey }}"
register: drupal_deploy_repo_updated
notify: restart webserver
notify: clear opcache
become: no

- name: Check if a composer.json file is present.
Expand Down
2 changes: 1 addition & 1 deletion tasks/install-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{ drupal_site_install_extra_args | default([]) | join(" ") }}
args:
chdir: "{{ drupal_core_path }}"
notify: restart webserver
notify: clear opcache
when: "'Successful' not in drupal_site_installed.stdout"
become: no

Expand Down

0 comments on commit 45d1a01

Please sign in to comment.