Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
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
20 changes: 20 additions & 0 deletions roles/cache_clear/cache_clear-drupal7/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
---
- name: Override paths for squashfs build cleanup step.
block:
- name: Override path to drush binary.
set_fact:
drush_bin: "{{ drush_live_bin }}"

- name: Override deploy_path.
set_fact:
deploy_path: "{{ live_symlink_dest }}"
when:
- deploy_code.mount_type is defined
- deploy_code.mount_type == "squashfs"
- deploy_operation == "cleanup"

- name: Clear Drupal 7 cache.
command:
cmd: "{{ drush_bin }} -l {{ site_drupal.folder }} -y cc all"
Expand All @@ -9,3 +23,9 @@
loop_control:
loop_var: site_drupal
run_once: true
register: _drush_output

- name: Show drush output.
ansible.builtin.debug:
msg: "{{ _drush_output }}"
when: drupal.drush_verbose_output
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# For some reason D7 drush doesn't respect 'chdir' with command, using shell instead.
- name: Apply Drupal database updates.
ansible.builtin.shell:
cmd: "{{ drush_bin }} -l {{ site.folder }} -y updb"
cmd: "{{ drush_live_bin }} -l {{ site.folder }} -y updb"
chdir: "{{ live_symlink_dest }}/{{ webroot }}/sites/{{ site.folder }}"
with_items: "{{ drupal.sites }}"
loop_control:
Expand Down