diff --git a/roles/sys-front-inj-all/tasks/01_dependencies.yml b/roles/sys-front-inj-all/tasks/01_dependencies.yml index 1a5cc9d2..192e1368 100644 --- a/roles/sys-front-inj-all/tasks/01_dependencies.yml +++ b/roles/sys-front-inj-all/tasks/01_dependencies.yml @@ -5,11 +5,10 @@ url: "{{ domains | get_url('web-app-matomo', WEB_PROTOCOL) }}" method: HEAD validate_certs: yes - status_code: [200, 301, 302] + status_code: 200 register: matomo_reachability failed_when: false changed_when: false - no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}" when: - application_id != 'web-app-matomo' - run_once_web_app_matomo is not defined @@ -20,7 +19,7 @@ public: false when: - matomo_reachability is defined - - matomo_reachability.status | default(0) not in [200, 301, 302] + - (matomo_reachability.status | default(0) | int) != 200 # Matomo can't use this dependencies - At least not on the initial setup run - when: diff --git a/roles/sys-svc-msmtp/tasks/01_core.yml b/roles/sys-svc-msmtp/tasks/01_core.yml index 13c4f072..0279b0bf 100644 --- a/roles/sys-svc-msmtp/tasks/01_core.yml +++ b/roles/sys-svc-msmtp/tasks/01_core.yml @@ -2,18 +2,17 @@ - name: "Check if Mail Host is reachable" uri: - url: "{{ WEB_PROTOCOL ~ '://' ~ SYSTEM_EMAIL.HOST }}" + url: "{{ WEB_PROTOCOL }}://{{ SYSTEM_EMAIL.HOST }}" method: HEAD validate_certs: yes - status_code: [200, 301, 302] + status_code: 200 register: mail_host_reachability failed_when: false changed_when: false - no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}" - when: + when: - run_once_web_app_mailu is not defined - - "{{ 'web-app-mailu' in group_names }}" - - SYSTEM_EMAIL.HOST == domains | get_domain('web-app-mailu') + - "'web-app-mailu' in group_names" + - SYSTEM_EMAIL.HOST == (domains | get_domain('web-app-mailu')) - name: "Load Mailu Routines for '{{ role_name }}'" include_tasks: 02_mailu.yml @@ -21,7 +20,7 @@ - "'web-app-mailu' in group_names" - > (mail_host_reachability is defined and - (mail_host_reachability.status | default(0)) not in [200, 301, 302]) + (mail_host_reachability.status | default(0) | int) != 200) or not (users['no-reply'].mailu_token | default(false) | bool)