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
This commit is contained in:
2025-12-02 18:14:16 +01:00
parent 20ecb62afe
commit de121338cf

View File

@@ -19,10 +19,14 @@
when: when:
- "'web-app-mailu' in group_names" - "'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 or
not (users['no-reply'].mailu_token | default(false) | bool) (
users['no-reply'].mailu_token | default('', true) | length == 0
)
- name: install msmtp msmtp-mta - name: install msmtp msmtp-mta
community.general.pacman: community.general.pacman: