ansible-msmtp-role/tasks/msmtp.yml
2021-12-01 16:57:04 +01:00

34 lines
512 B
YAML

---
# Author: Adham Helal
#
# Objective: Deploy msmtp
- name: Install msmtp and mailx
apt:
name: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 3600
with_items:
- msmtp-mta
- bsd-mailx
- name: Copy mstprc conf file
template:
src: msmtprc.j2
dest: /etc/msmtprc
owner: root
group: root
mode: 0644
- name: Copy aliases conf file
template:
src: aliases.j2
dest: /etc/aliases
owner: root
group: root
mode: 0644