msmtp(role): introduce msmtp role
Introduce msmtp role for setting up msmtp for mail sending. Also add accompanying host group and playbook play.
This commit is contained in:
parent
18dda95c46
commit
afceb886dc
6 changed files with 83 additions and 0 deletions
14
roles/msmtp/tasks/main.yaml
Normal file
14
roles/msmtp/tasks/main.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- name: ensure msmtp is installed
|
||||
ansible.builtin.apt:
|
||||
name: msmtp
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: ensure msmtp config for root user
|
||||
ansible.builtin.template:
|
||||
src: msmtprc.j2
|
||||
dest: /root/.msmtprc
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
become: true
|
Loading…
Add table
Add a link
Reference in a new issue