Skip to content
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
1 change: 1 addition & 0 deletions docs/roles/cache_clear/cache_clear-opcache.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cache_clear_opcache:
clear_opcache: true
clear_apcu: false
clear_stat: false
# cachetool_bin: "/path/to/cachetool.phar" # see _init for paths if undefined

```

Expand Down
10 changes: 9 additions & 1 deletion roles/_init/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
live_symlink_dest: "{{ live_symlink_dest | default('{{ deploy_base_path }}/live.{{ project_name }}_{{ build_type }}') }}"
- name: Define opcache cachetool path.
ansible.builtin.set_fact:
cachetool_bin: "{{ cachetool_bin | default('{{ deploy_base_path }}/cachetool.phar') }}"
cachetool_bin: "{{ deploy_base_path }}/cachetool.phar"
when: cache_clear_opcache.cachetool_bin is not defined
- name: Set opcache cachetool path from variable.
ansible.builtin.set_fact:
cachetool_bin: "{{ cache_clear_opcache.cachetool_bin }}"
when:
- cache_clear_opcache.cachetool_bin is defined
- cache_clear_opcache.cachetool_bin | length > 0

# Manipulate variables for SquashFS builds.
- name: Define image builds base path.
Expand Down Expand Up @@ -56,6 +63,7 @@
when:
- deploy_code.mount_type is defined
- deploy_code.mount_type == "squashfs"
- cache_clear_opcache.cachetool_bin is not defined

# Gather last known good build directly from symlink.
# This can happen:
Expand Down
1 change: 1 addition & 0 deletions roles/cache_clear/cache_clear-opcache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cache_clear_opcache:
clear_opcache: true
clear_apcu: false
clear_stat: false
# cachetool_bin: "/path/to/cachetool.phar" # see _init for paths if undefined

```

Expand Down
1 change: 1 addition & 0 deletions roles/cache_clear/cache_clear-opcache/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ cache_clear_opcache:
clear_opcache: true
clear_apcu: false
clear_stat: false
# cachetool_bin: "/path/to/cachetool.phar" # see _init for paths if undefined