]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Fix ssmtp for mail cofniguration
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 6 Mar 2020 18:20:52 +0000 (19:20 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 6 Mar 2020 18:23:37 +0000 (19:23 +0100)
modules/profile/manifests/mail.pp
modules/profile/templates/mail/ssmtp.conf.erb
modules/role/manifests/caldance.pp

index 0b4a7a5e543bcee1ee3a1806abee6dc796323501..ee295dd16708504963cbb73c306ee7c898dd4e16 100644 (file)
@@ -5,7 +5,10 @@ class profile::mail (
 ) {
   ensure_packages(["s-nail", "ssmtp"])
 
-  $hostname = lookup("base_installation::real_hostname")
+  $mail_host = "mail.immae.eu"
+  $password_seed = lookup("base_installation::puppet_pass_seed")
+  $ldap_password = generate_password(24, $password_seed, "ldap")
+  $ldap_cn = lookup("base_installation::ldap_cn")
 
   file { "/etc/ssmtp/ssmtp.conf":
     ensure  => "present",
index 176614077c9f1550240d98b20dde0382fdcc2b84..ea5bc99eb105580986176df52861f32dd2d8c4f1 100644 (file)
@@ -11,4 +11,9 @@ mailhub=<%= @mailhub %>:<%= @mailhub_port %>
 # Where will the mail seem to come from?
 #rewriteDomain=y
 # The full hostname
-hostname=<%= @hostname %>
+hostname=<%= @mail_host %>
+TLS_CA_FILE=/etc/ssl/certs/ca-certificates.crt
+UseTLS=Yes
+UseSTARTTLS=Yes
+AuthUser=<%= @ldap_cn %>
+AuthPass=<%= @ldap_password %>
index edf5790b25baa1c41879d296d4573b7b654aca7b..b397d0273120f109f5f482a80a8188263e529176 100644 (file)
@@ -142,7 +142,7 @@ class role::caldance (
 
   profile::postgresql::master { "postgresql master for caldance":
     letsencrypt_host => $web_host,
-    backup_hosts     => ["backup-1"],
+    backup_hosts     => [],
   }
 
   postgresql::server::db { $pg_db: