Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Move cache clear for Drush. (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamzimmermann authored Mar 25, 2020
1 parent bd268d9 commit 7700e72
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,23 @@
mode: 0770
become: "{{ deploydrupal_files_become }}"

- name: clear drush cache.
shell: "{{ deploydrupal_drush_path }} cache-clear drush"
args:
chdir: "{{ deploydrupal_core_path }}/sites/{{ deploydrupal_site_name }}"

- name: clear caches.
shell: "{{ deploydrupal_drush_path }} cache-rebuild"
args:
chdir: "{{ deploydrupal_core_path }}/sites/{{ deploydrupal_site_name }}"
when:
- not deploydrupal_site_install
- deploydrupal_drush_cache_rebuild

# Drush ^9 uses the Drupal service container. We intentionally clear the Drupal
# cache before the Drush cache to avoid fatal errors due to stale cache in the
# service container.
- name: clear drush cache.
shell: "{{ deploydrupal_drush_path }} cache-clear drush"
args:
chdir: "{{ deploydrupal_core_path }}/sites/{{ deploydrupal_site_name }}"
when:
- deploydrupal_drush_cache_rebuild

# site-install.
- name: install site.
Expand Down

0 comments on commit 7700e72

Please sign in to comment.