diff --git a/roles/cli/cachetool/defaults/main.yml b/roles/cli/cachetool/defaults/main.yml index 77c338ce..5c4ccbc0 100644 --- a/roles/cli/cachetool/defaults/main.yml +++ b/roles/cli/cachetool/defaults/main.yml @@ -2,6 +2,8 @@ cachetool: version: "" # enter three-digit version number, e.g. "7.0.0", to install a specific version. If not specified, will be installed depending on the php version. unix_socket: false # Set to true to use automatic detection of Unix socket as set by ce-provision + check_retries: 5 + check_delay: 20 # Adapter string to use as argument. # e.g. # --fcgi=127.0.0.1:9000 diff --git a/roles/cli/cachetool/tasks/main.yml b/roles/cli/cachetool/tasks/main.yml index 0c221115..f765da90 100644 --- a/roles/cli/cachetool/tasks/main.yml +++ b/roles/cli/cachetool/tasks/main.yml @@ -107,3 +107,7 @@ ansible.builtin.command: cmd: "{{ cachetool_bin }} {{ _cachetool_adapter }} -n opcache:status" when: _php_version.stdout | length > 0 + register: opcache_status_check + retries: "{{ cachetool.check_retries }}" + delay: "{{ cachetool.check_delay }}" + until: opcache_status_check.rc == 0