homelab/roles/base/tasks/mail.yml

20 lines
335 B
YAML
Raw Permalink Normal View History

2021-06-08 04:33:55 +00:00
- name: Install msmtp
apt:
name: "{{ item }}"
state: present
loop:
- msmtp
- msmtp-mta
- mailutils
- name: Install msmtp configuration
template:
src: msmtprc.j2
dest: /root/.msmtprc
mode: 0700
- name: Install /etc/aliases
copy:
dest: /etc/aliases
content: "root: {{ mail.rootalias }}"