Remove MTAs optional
This commit is contained in:
parent
dc3f1a83a1
commit
33820c140f
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
msmtp_accounts:
|
||||
# Account 1 - a real account for testing
|
||||
# Account 1 - a real account for testing (feel free to use it for this role)
|
||||
- account : yandex
|
||||
host : smtp.yandex.com
|
||||
port : 587
|
||||
|
@ -29,4 +29,8 @@ msmtp_alias_default : emailer.tests@yandex.com
|
|||
msmtp_alias_root : emailer.tests@yandex.com
|
||||
msmtp_alias_cron : emailer.tests@yandex.com
|
||||
|
||||
## Only enable, if the smtp account is working
|
||||
msmtp_send_test_mail: no
|
||||
|
||||
## This will remove most other mail transfer agents such as postfix, exim,...!
|
||||
msmtp_remove_mtas: no
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# Deploy msmtp
|
||||
- name: Update apt cache.
|
||||
apt:
|
||||
upgrade: yes
|
||||
update_cache: yes
|
||||
upgrade: no
|
||||
cache_valid_time: 14400 # 4 hours
|
||||
tags: mail
|
||||
when: ansible_os_family == "Debian"
|
||||
|
@ -20,6 +20,7 @@
|
|||
- sendmail*
|
||||
tags:
|
||||
- mail
|
||||
when: msmtp_remove_mtas
|
||||
|
||||
- name: Install msmtp and mailx on Debian.
|
||||
apt:
|
||||
|
@ -32,7 +33,7 @@
|
|||
notify: test mail
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
# not tested my modifications with Archlinux
|
||||
# I've not tested my modifications with Archlinux
|
||||
- name: Install msmtp and mailx on Archlinux.
|
||||
pacman: name={{item}} state=present
|
||||
with_items:
|
||||
|
|
Loading…
Reference in a new issue