
- 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