initial commit
This commit is contained in:
commit
92aac47895
3 changed files with 31 additions and 0 deletions
4
defaults/main.yml
Normal file
4
defaults/main.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
mail:
|
||||||
|
root: "root@example.com"
|
||||||
|
server: "mail.example.com"
|
||||||
|
domain: "example.com"
|
||||||
6
tasks/main.yml
Normal file
6
tasks/main.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
- name: install ssmtp
|
||||||
|
apt: pkg=ssmtp state=latest
|
||||||
|
- name: setup ssmtp
|
||||||
|
template:
|
||||||
|
src: smtp.conf.j2
|
||||||
|
dest: /etc/ssmtp/ssmtp.conf
|
||||||
21
templates/smtp.conf.j2
Normal file
21
templates/smtp.conf.j2
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
#
|
||||||
|
# Config file for sSMTP sendmail
|
||||||
|
#
|
||||||
|
# The person who gets all mail for userids < 1000
|
||||||
|
# Make this empty to disable rewriting.
|
||||||
|
root={{ mail['root'] }}
|
||||||
|
|
||||||
|
# The place where the mail goes. The actual machine name is required no
|
||||||
|
# MX records are consulted. Commonly mailhosts are named mail.domain.com
|
||||||
|
mailhub={{ mail['server'] }}
|
||||||
|
|
||||||
|
# Where will the mail seem to come from?
|
||||||
|
rewriteDomain={{ mail['domain'] }}
|
||||||
|
|
||||||
|
# The full hostname
|
||||||
|
hostname={{ inventory_hostname }}
|
||||||
|
|
||||||
|
# Are users allowed to set their own From: address?
|
||||||
|
# YES - Allow the user to specify their own From: address
|
||||||
|
# NO - Use the system generated From: address
|
||||||
|
FromLineOverride=YES
|
||||||
Loading…
Add table
Add a link
Reference in a new issue