- include_tasks: utils/once/flag.yml - name: "Check if Mail Host is reachable" uri: url: "{{ WEB_PROTOCOL }}://{{ SYSTEM_EMAIL.HOST }}" method: HEAD validate_certs: yes status_code: 200 register: mail_host_reachability failed_when: false changed_when: false when: - run_once_web_app_mailu is not defined - "'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 when: - "'web-app-mailu' in group_names" - > ( mail_host_reachability is defined and (mail_host_reachability.status | default(0) | int) != 200 ) or ( users['no-reply'].mailu_token | default('', true) | length == 0 ) - name: install msmtp msmtp-mta community.general.pacman: name: - msmtp - msmtp-mta state: present - name: configure msmtprc.conf.j2 template: src: "msmtprc.conf.j2" dest: "/root/.msmtprc" mode: 600 - include_role: name: sys-ctl-hlth-msmtp when: run_once_sys_ctl_hlth_msmtp is not defined - include_tasks: utils/once/flag.yml