From: Ismaƫl Bouya Date: Fri, 11 May 2018 10:23:47 +0000 (+0200) Subject: Add mail configuration for cryptoportfolio X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPuppet.git;a=commitdiff_plain;h=5a5b32d87d06cfc6dce82cf83cb023ed2764fc45 Add mail configuration for cryptoportfolio --- diff --git a/modules/role/manifests/cryptoportfolio.pp b/modules/role/manifests/cryptoportfolio.pp index 5aaaee3..59dacd0 100644 --- a/modules/role/manifests/cryptoportfolio.pp +++ b/modules/role/manifests/cryptoportfolio.pp @@ -10,6 +10,10 @@ class role::cryptoportfolio ( Optional[String] $pg_hostname = "/run/postgresql", Optional[String] $pg_port = "5432", Optional[String] $redis_host = "/run/redis/redis.sock", + Optional[String] $smtp_login = undef, + Optional[String] $smtp_password = undef, + Optional[String] $smtp_host = undef, + Optional[String] $mail_from = undef, Optional[String] $web_host = undef, Optional[String] $web_port = "", Optional[Boolean] $web_ssl = true, diff --git a/modules/role/templates/cryptoportfolio/api_conf.toml.erb b/modules/role/templates/cryptoportfolio/api_conf.toml.erb index d806778..6bed739 100644 --- a/modules/role/templates/cryptoportfolio/api_conf.toml.erb +++ b/modules/role/templates/cryptoportfolio/api_conf.toml.erb @@ -34,3 +34,11 @@ free_sms_pass="<%= @cf_front_app_free_sms_pass %>" [app] public_dir="../web/build/static" + +<%- if !@smtp_host.nil? && @smtp_host != "" -%> +[mail] +login="<%= @smtp_login %>" +address_from="<%= @mail_from %>" +password="<%= @smtp_password %>" +smtp_address="<%= @smtp_host %>" +<%- end -%>