From: Ismaƫl Bouya Date: Fri, 6 Mar 2020 18:20:52 +0000 (+0100) Subject: Fix ssmtp for mail cofniguration X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=8093d467c2f81afe4d321d0547e2cfc2c4067f57;p=perso%2FImmae%2FProjets%2FPuppet.git Fix ssmtp for mail cofniguration --- 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 ( ) { 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", 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 %> # 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 %> 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 ( profile::postgresql::master { "postgresql master for caldance": letsencrypt_host => $web_host, - backup_hosts => ["backup-1"], + backup_hosts => [], } postgresql::server::db { $pg_db: