web-app-matomo: fail fast on bootstrap root cause

This commit is contained in:
kevinveenbirkenbach committed 2026-02-24 12:13:15 +01:00
1 parent 7ecdc924c5
commit 757e20fffa
1 file changed
+10 -4
+10 -4
View File
@@ -21,11 +21,17 @@
until: matomo_bootstrap_run.rc == 0
rescue:
- name: "Load Boostrap Debug Info"
- name: "Load Bootstrap Debug Info"
include_tasks: 03b_bootstrap_debug.yml
when:
- MASK_CREDENTIALS_IN_LOGS | bool
- MODE_DEBUG | bool
when: MODE_DEBUG | bool
- name: "Matomo bootstrap | Abort with bootstrap root cause"
ansible.builtin.fail:
msg: >-
Matomo bootstrap run failed after {{ matomo_bootstrap_run.attempts | default(MATOMO_BOOTSTRAP_RETRIES) }} attempt(s)
with rc={{ matomo_bootstrap_run.rc | default('n/a') }}.
stderr={{ (matomo_bootstrap_run.stderr | default('') | trim) if not (MASK_CREDENTIALS_IN_LOGS | bool) else ('<masked,len=' ~ ((matomo_bootstrap_run.stderr | default('') | string | length) | string) ~ '>') }}
stdout={{ (matomo_bootstrap_run.stdout | default('') | trim) if not (MASK_CREDENTIALS_IN_LOGS | bool) else ('<masked,len=' ~ ((matomo_bootstrap_run.stdout | default('') | string | length) | string) ~ '>') }}
- name: "Matomo bootstrap | Set effective token (prefer existing, else parse bootstrap stdout)"
ansible.builtin.set_fact: