From de121338cf4257a428edfe6061eaab87d542154b Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 2 Dec 2025 18:14:16 +0100 Subject: [PATCH] Fix MSMTP Mailu routine loading condition - Correct grouping of reachability check - Replace incorrect boolean cast for mailu_token with length check - Load Mailu routines only when host is unreachable or token is missing Details: https://chatgpt.com/share/692f1e58-0d6c-800f-9699-e9a26f1e8db9 --- roles/sys-svc-msmtp/tasks/01_core.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/roles/sys-svc-msmtp/tasks/01_core.yml b/roles/sys-svc-msmtp/tasks/01_core.yml index 0279b0bf..5cd3b980 100644 --- a/roles/sys-svc-msmtp/tasks/01_core.yml +++ b/roles/sys-svc-msmtp/tasks/01_core.yml @@ -19,10 +19,14 @@ when: - "'web-app-mailu' in group_names" - > - (mail_host_reachability is defined and - (mail_host_reachability.status | default(0) | int) != 200) + ( + mail_host_reachability is defined and + (mail_host_reachability.status | default(0) | int) != 200 + ) or - not (users['no-reply'].mailu_token | default(false) | bool) + ( + users['no-reply'].mailu_token | default('', true) | length == 0 + ) - name: install msmtp msmtp-mta community.general.pacman: