Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handler to clear opcache #38

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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