Merge pull request #1 from nuskunetworks/master

Minor Tweak For Arch
This commit is contained in:
Adham Helal 2014-06-25 09:06:17 +02:00
commit 0a8f71fbbd
2 changed files with 16 additions and 2 deletions

View File

@ -7,6 +7,7 @@
- name: Update apt cache - name: Update apt cache
apt: update_cache=yes cache_valid_time=3600 apt: update_cache=yes cache_valid_time=3600
tags: mail tags: mail
when: ansible_os_family == "Debian"
- name: Install msmtp and mailx - name: Install msmtp and mailx
apt: pkg={{item}} state=present apt: pkg={{item}} state=present
@ -16,6 +17,15 @@
- bsd-mailx - bsd-mailx
tags: mail tags: mail
notify: test 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:
@ -31,4 +41,4 @@
template: src=aliases.j2 dest=/etc/aliases template: src=aliases.j2 dest=/etc/aliases
owner=root group=root mode=0644 owner=root group=root mode=0644
tags: mail tags: mail
notify: test mail notify: test mail

View File

@ -3,7 +3,11 @@
defaults defaults
auth on auth on
tls on tls on
{% if msmtp_tls_trust_file is defined %}
tls_trust_file {{msmtp_tls_trust_file}}
{% else %}
tls_trust_file /etc/ssl/certs/ca-certificates.crt tls_trust_file /etc/ssl/certs/ca-certificates.crt
{% endif %}
# Logging # Logging
{% if msmtp_log is defined %} {% if msmtp_log is defined %}
@ -33,4 +37,4 @@ password {{msmtp_account.password}}
# Default account to use # Default account to use
account default : {{msmtp_default_account}} account default : {{msmtp_default_account}}
aliases /etc/aliases aliases /etc/aliases