ansible-msmtp-role/tasks/main.yml
2023-05-20 15:34:53 +02:00

33 lines
586 B
YAML
Executable File

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