Make minor change
This commit is contained in:
parent
0a8f71fbbd
commit
d3bb25dd68
@ -23,6 +23,6 @@ msmtp_log : "syslog"
|
|||||||
#msmtp_logfile : /var/log/msmtp.log
|
#msmtp_logfile : /var/log/msmtp.log
|
||||||
|
|
||||||
## Aliases mail account ( only msmtp_alias_default is required the rest is optional )
|
## Aliases mail account ( only msmtp_alias_default is required the rest is optional )
|
||||||
msmtp_alias_default : ops@example.
|
msmtp_alias_default : ops@example.com
|
||||||
msmtp_alias_root : root@example.com
|
msmtp_alias_root : root@example.com
|
||||||
msmtp_alias_cron : cron@example.com
|
msmtp_alias_cron : cron@example.com
|
||||||
|
@ -4,41 +4,30 @@
|
|||||||
#
|
#
|
||||||
# Objective: Deploy msmtp
|
# Objective: Deploy msmtp
|
||||||
|
|
||||||
- name: Update apt cache
|
|
||||||
apt: update_cache=yes cache_valid_time=3600
|
|
||||||
tags: mail
|
|
||||||
when: ansible_os_family == "Debian"
|
|
||||||
|
|
||||||
- name: Install msmtp and mailx
|
- name: Install msmtp and mailx
|
||||||
apt: pkg={{item}} state=present
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 3600
|
||||||
with_items:
|
with_items:
|
||||||
- msmtp
|
|
||||||
- msmtp-mta
|
- msmtp-mta
|
||||||
- bsd-mailx
|
- bsd-mailx
|
||||||
tags: mail
|
|
||||||
notify: test mail
|
|
||||||
when: ansible_os_family == "Debian"
|
|
||||||
|
|
||||||
- name: Install msmtp and mailx
|
|
||||||
pacman: name={{item}} state=present
|
|
||||||
with_items:
|
|
||||||
- msmtp
|
|
||||||
- msmtp-mta
|
|
||||||
- mailutils
|
|
||||||
when: ansible_os_family == "Archlinux"
|
|
||||||
|
|
||||||
- name: Copy mstprc conf file
|
- name: Copy mstprc conf file
|
||||||
template:
|
template:
|
||||||
src=msmtprc.j2
|
src: msmtprc.j2
|
||||||
dest=/etc/msmtprc
|
dest: /etc/msmtprc
|
||||||
owner=root
|
owner: root
|
||||||
group=root
|
group: root
|
||||||
mode=0644
|
mode: 0644
|
||||||
tags: mail
|
|
||||||
notify: test mail
|
|
||||||
|
|
||||||
- name: Copy aliases conf file
|
- name: Copy aliases conf file
|
||||||
template: src=aliases.j2 dest=/etc/aliases
|
template:
|
||||||
owner=root group=root mode=0644
|
src: aliases.j2
|
||||||
tags: mail
|
dest: /etc/aliases
|
||||||
notify: test mail
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user