updated role for debian buster wich dropped ssmtp
This commit is contained in:
parent
92aac47895
commit
98faa5ea81
4 changed files with 26 additions and 6 deletions
3
handlers/main.yml
Normal file
3
handlers/main.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: restart nullmailer
|
||||
service: name=nullmailer state=restarted
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
- name: install ssmtp
|
||||
apt: pkg=ssmtp state=latest
|
||||
- name: setup ssmtp
|
||||
template:
|
||||
src: smtp.conf.j2
|
||||
dest: /etc/ssmtp/ssmtp.conf
|
||||
- include_tasks: ssmtp.yml
|
||||
when: ansible_distribution_release == "stretch"
|
||||
- include_tasks: nullmailer.yml
|
||||
when: ansible_distribution_release != "stretch"
|
||||
|
|
|
|||
12
tasks/nullmailer.yml
Normal file
12
tasks/nullmailer.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
- name: install nullmailer
|
||||
apt: pkg=nullmailer state=latest
|
||||
|
||||
- name: setup nullmailer
|
||||
notify: restart nullmailer
|
||||
copy:
|
||||
dest: "{{ item.dest }}"
|
||||
content: "{{ mail.root }}"
|
||||
with_items:
|
||||
- {"dest": "/etc/nullmailer/adminaddr", content: "{{ mail.root }}"}
|
||||
- {"dest": "/etc/nullmailer/remotes", content: "{{ mail.root }}"}
|
||||
- {"dest": "/etc/nullmailer/defaultdomain", content: "{{ mail.domain }}"}
|
||||
7
tasks/ssmtp.yml
Normal file
7
tasks/ssmtp.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
- name: install ssmtp
|
||||
apt: pkg=ssmtp state=latest
|
||||
|
||||
- name: setup ssmtp
|
||||
template:
|
||||
src: smtp.conf.j2
|
||||
dest: /etc/ssmtp/ssmtp.conf
|
||||
Loading…
Add table
Add a link
Reference in a new issue