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
2 changes: 1 addition & 1 deletion roles/_init/tasks/drupal7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import_role:
name: cli/drush

- name: Ensure we have a cachetool binary.
- name: Ensure we have a cachetool binary and configuration.
ansible.builtin.import_role:
name: cli/cachetool
when: install_php_cachetool
6 changes: 2 additions & 4 deletions roles/_init/tasks/drupal8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
ansible.builtin.set_fact:
drush_live_bin: "{{ drush_live_bin | default('{{ live_symlink_dest }}/vendor/bin/drush') }}"

- name: Ensure we have a cachetool binary.
- name: Ensure we have a cachetool binary and configuration.
ansible.builtin.import_role:
name: cli/cachetool
when:
- install_php_cachetool
- deploy_operation == 'deploy'
when: install_php_cachetool
25 changes: 12 additions & 13 deletions roles/cli/cachetool/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
---
- name: Remove previous cachetool if exists.
ansible.builtin.file:
path: "{{ cachetool_bin }}"
state: absent
when:
- deploy_operation == 'deploy'
- name: Initial housekeeping tasks.
when: deploy_operation == 'deploy'
block:
- name: Remove previous cachetool if exists.
ansible.builtin.file:
path: "{{ cachetool_bin }}"
state: absent

- name: Ensure bin directory exists.
ansible.builtin.file:
path: "{{ cachetool_bin | dirname }}"
state: directory
when:
- deploy_operation == 'deploy'
- name: Ensure bin directory exists.
ansible.builtin.file:
path: "{{ cachetool_bin | dirname }}"
state: directory

- name: Download cachetool depending on latest php version installed. # If not specified manually, according to https://github.com/gordalina/cachetool#compatibility
when:
Expand Down Expand Up @@ -84,7 +83,7 @@
- cachetool.version is defined
- cachetool.version | length > 0

# Set up cachetool adapter
# Set up cachetool adapter - needs to happen on every run so _cachetool_adapter is set.
- name: Get latest PHP version installed.
ansible.builtin.shell:
cmd: 'set -o pipefail && ls -1 /etc/php/ | while read ver; do if [ -d "/etc/php/$ver/fpm" ]; then echo "$ver"; fi; done | tail -1'
Expand Down