aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-03-06 19:20:52 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-03-06 19:23:37 +0100
commit8093d467c2f81afe4d321d0547e2cfc2c4067f57 (patch)
tree343c82e494537d0d3c5e76205bb24a0251292f66
parent367c391a61091817cf34475f91a23ca286eec334 (diff)
downloadPuppet-8093d467c2f81afe4d321d0547e2cfc2c4067f57.tar.gz
Puppet-8093d467c2f81afe4d321d0547e2cfc2c4067f57.tar.zst
Puppet-8093d467c2f81afe4d321d0547e2cfc2c4067f57.zip
Fix ssmtp for mail cofniguration
-rw-r--r--modules/profile/manifests/mail.pp5
-rw-r--r--modules/profile/templates/mail/ssmtp.conf.erb7
-rw-r--r--modules/role/manifests/caldance.pp2
3 files changed, 11 insertions, 3 deletions
diff --git a/modules/profile/manifests/mail.pp b/modules/profile/manifests/mail.pp
index 0b4a7a5..ee295dd 100644
--- a/modules/profile/manifests/mail.pp
+++ b/modules/profile/manifests/mail.pp
@@ -5,7 +5,10 @@ class profile::mail (
5) { 5) {
6 ensure_packages(["s-nail", "ssmtp"]) 6 ensure_packages(["s-nail", "ssmtp"])
7 7
8 $hostname = lookup("base_installation::real_hostname") 8 $mail_host = "mail.immae.eu"
9 $password_seed = lookup("base_installation::puppet_pass_seed")
10 $ldap_password = generate_password(24, $password_seed, "ldap")
11 $ldap_cn = lookup("base_installation::ldap_cn")
9 12
10 file { "/etc/ssmtp/ssmtp.conf": 13 file { "/etc/ssmtp/ssmtp.conf":
11 ensure => "present", 14 ensure => "present",
diff --git a/modules/profile/templates/mail/ssmtp.conf.erb b/modules/profile/templates/mail/ssmtp.conf.erb
index 1766140..ea5bc99 100644
--- a/modules/profile/templates/mail/ssmtp.conf.erb
+++ b/modules/profile/templates/mail/ssmtp.conf.erb
@@ -11,4 +11,9 @@ mailhub=<%= @mailhub %>:<%= @mailhub_port %>
11# Where will the mail seem to come from? 11# Where will the mail seem to come from?
12#rewriteDomain=y 12#rewriteDomain=y
13# The full hostname 13# The full hostname
14hostname=<%= @hostname %> 14hostname=<%= @mail_host %>
15TLS_CA_FILE=/etc/ssl/certs/ca-certificates.crt
16UseTLS=Yes
17UseSTARTTLS=Yes
18AuthUser=<%= @ldap_cn %>
19AuthPass=<%= @ldap_password %>
diff --git a/modules/role/manifests/caldance.pp b/modules/role/manifests/caldance.pp
index edf5790..b397d02 100644
--- a/modules/role/manifests/caldance.pp
+++ b/modules/role/manifests/caldance.pp
@@ -142,7 +142,7 @@ class role::caldance (
142 142
143 profile::postgresql::master { "postgresql master for caldance": 143 profile::postgresql::master { "postgresql master for caldance":
144 letsencrypt_host => $web_host, 144 letsencrypt_host => $web_host,
145 backup_hosts => ["backup-1"], 145 backup_hosts => [],
146 } 146 }
147 147
148 postgresql::server::db { $pg_db: 148 postgresql::server::db { $pg_db: