moved more to nullmailer

This commit is contained in:
nd 2020-04-13 16:41:27 +02:00
parent faa6d2ed98
commit 0b75fc3a69
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
3 changed files with 15 additions and 2 deletions

View file

@ -2,3 +2,4 @@ mail:
root: "root@example.com" root: "root@example.com"
server: "mail.example.com" server: "mail.example.com"
domain: "example.com" domain: "example.com"
backend: nullmailer

View file

@ -1,4 +1,6 @@
- include_tasks: ssmtp.yml - include_tasks: ssmtp.yml
when: ansible_distribution_release == "stretch" when:
- ansible_distribution_release == "stretch"
- mail.backend == "ssmtp"
- include_tasks: nullmailer.yml - include_tasks: nullmailer.yml
when: ansible_distribution_release != "stretch" when: (ansible_distribution_release != "stretch" or mail.backend != "ssmtp")

View file

@ -2,6 +2,16 @@
apt: apt:
pkg: nullmailer pkg: nullmailer
- name: remove ssmtp
apt:
pkg: ssmtp
state: absent
- name: remove ssmtp config
file:
path: /etc/ssmtp/ssmtp.conf
state: absent
- name: setup nullmailer - name: setup nullmailer
notify: restart nullmailer notify: restart nullmailer
copy: copy: