You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Moving cachetool adapter setup to the installer role and adding a test.
* Updating cachetool documentation.
* Making sure _cachetool_adapter is always set.
Copy file name to clipboardExpand all lines: roles/cli/cachetool/tasks/main.yml
+12-13Lines changed: 12 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,16 @@
1
1
---
2
-
- name: Remove previous cachetool if exists.
3
-
ansible.builtin.file:
4
-
path: "{{ cachetool_bin }}"
5
-
state: absent
6
-
when:
7
-
- deploy_operation == 'deploy'
2
+
- name: Initial housekeeping tasks.
3
+
when: deploy_operation == 'deploy'
4
+
block:
5
+
- name: Remove previous cachetool if exists.
6
+
ansible.builtin.file:
7
+
path: "{{ cachetool_bin }}"
8
+
state: absent
8
9
9
-
- name: Ensure bin directory exists.
10
-
ansible.builtin.file:
11
-
path: "{{ cachetool_bin | dirname }}"
12
-
state: directory
13
-
when:
14
-
- deploy_operation == 'deploy'
10
+
- name: Ensure bin directory exists.
11
+
ansible.builtin.file:
12
+
path: "{{ cachetool_bin | dirname }}"
13
+
state: directory
15
14
16
15
- name: Download cachetool depending on latest php version installed. # If not specified manually, according to https://github.com/gordalina/cachetool#compatibility
17
16
when:
@@ -84,7 +83,7 @@
84
83
- cachetool.version is defined
85
84
- cachetool.version | length > 0
86
85
87
-
# Set up cachetool adapter
86
+
# Set up cachetool adapter - needs to happen on every run so _cachetool_adapter is set.
88
87
- name: Get latest PHP version installed.
89
88
ansible.builtin.shell:
90
89
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'
0 commit comments