File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
roles/cache_clear/cache_clear-opcache Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
cache_clear_opcache :
3
3
# Adapter string to use as argument.
4
- # eg .
4
+ # e.g .
5
5
# --fcgi=127.0.0.1:9000
6
- # Leave blank to use /etc/cachetool.yml
7
- # adapter: "--fcgi=127.0.0.1:9081" # Leave commented to automatically detect the adapter based on PHP version.
6
+ # --fcgi=/var/run/php-fpm.sock
7
+ # Provide an empty string to use /etc/cachetool.yml
8
+ # adapter: "--fcgi=127.0.0.1:9081" # Leave commented to automatically detect the adapter based on PHP version.
9
+ unix_socket : false # Set to true to use automatic detection of Unix socket as set by ce-provision
8
10
# Bins to clear.
9
11
clear_opcache : true
10
12
clear_apcu : false
11
13
clear_stat : true
12
- # cachetool_bin: "/path/to/cachetool.phar" # see _init for paths if undefined
14
+ # cachetool_bin: "/path/to/cachetool.phar" # see _init for default paths if undefined
Original file line number Diff line number Diff line change 6
6
executable : /bin/bash
7
7
register : _php_version
8
8
9
- - name : Set cachetool adapter.
9
+ - name : Set cachetool adapter specified or default to a TCP/IP port .
10
10
ansible.builtin.set_fact :
11
11
_cachetool_adapter : " {{ cache_clear_opcache.adapter | default('--fcgi=127.0.0.1:90' + _php_version.stdout | replace('.','')) }}"
12
12
13
+ - name : Override cachetool adapter to be a Unix socket if requested.
14
+ ansible.builtin.set_fact :
15
+ _cachetool_adapter : " --fcgi=/var/run/php{{ _php_version.stdout | replace('.','') }}-fpm.sock"
16
+ when :
17
+ - cache_clear_opcache.unix_socket
18
+ - cache_clear_opcache.adapter is not defined
19
+
20
+ # cachetool_bin is set in the _init role.
13
21
- name : Clear opcache.
14
22
ansible.builtin.command :
15
23
cmd : " {{ cachetool_bin }} {{ _cachetool_adapter }} -n opcache:reset"
You can’t perform that action at this time.
0 commit comments