diff --git a/roles/_init/tasks/main.yml b/roles/_init/tasks/main.yml index effa2790..f4fe5823 100644 --- a/roles/_init/tasks/main.yml +++ b/roles/_init/tasks/main.yml @@ -107,7 +107,14 @@ - name: Define opcache cachetool path. ansible.builtin.set_fact: - cachetool_bin: "{{ cachetool_bin | default('/home/{{ deploy_user }}/.bin/cachetool.phar') }}" + cachetool_bin: "{{ cachetool_bin | default('{{ deploy_base_path }}/cachetool.phar') }}" + +- name: Define opcache cachetool path if SquashFS deploy. + ansible.builtin.set_fact: + cachetool_bin: "{{ cachetool_bin | default('{{ build_base_path }}/cachetool.phar') }}" + when: + - deploy_code.mount_type is defined + - deploy_code.mount_type == "squashfs" - name: Ensure we have a cachetool binary. ansible.builtin.import_role: