initial commit

This commit is contained in:
nd 2017-10-07 03:25:51 +02:00
commit 92aac47895
3 changed files with 31 additions and 0 deletions

4
defaults/main.yml Normal file
View file

@ -0,0 +1,4 @@
mail:
root: "root@example.com"
server: "mail.example.com"
domain: "example.com"

6
tasks/main.yml Normal file
View 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
View 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