diff --git a/ansible_playbooks/vars/nomad_vars.sample.yml b/ansible_playbooks/vars/nomad_vars.sample.yml index a7a2660..bc334a9 100644 --- a/ansible_playbooks/vars/nomad_vars.sample.yml +++ b/ansible_playbooks/vars/nomad_vars.sample.yml @@ -3,11 +3,6 @@ nomad/jobs: db_user_ro: VALUE ldap_base_dn: VALUE notify_email: VALUE - smtp_password: VALUE - smtp_port: VALUE - smtp_server: VALUE - smtp_tls: VALUE - smtp_user: VALUE nomad/jobs/authelia: db_name: VALUE db_pass: VALUE diff --git a/core/authelia.tf b/core/authelia.tf index 6e84dad..e7f00a9 100644 --- a/core/authelia.tf +++ b/core/authelia.tf @@ -27,6 +27,7 @@ module "authelia" { use_mysql = true use_ldap = true use_redis = true + use_smtp = true mysql_bootstrap = { enabled = true } @@ -96,7 +97,7 @@ module "authelia" { mount = false }, { - data = "{{ with nomadVar \"nomad/jobs\" }}{{ .smtp_password }}{{ end }}" + data = "{{ with nomadVar \"secrets/smtp\" }}{{ .password }}{{ end }}" dest_prefix = "$${NOMAD_SECRETS_DIR}" dest = "smtp_password.txt" mount = false diff --git a/core/authelia.yml b/core/authelia.yml index 1ff41eb..aacb45e 100644 --- a/core/authelia.yml +++ b/core/authelia.yml @@ -221,11 +221,11 @@ notifier: ## You can disable the notifier startup check by setting this to true. disable_startup_check: false -{{ with nomadVar "nomad/jobs" }} +{{ with nomadVar "secrets/smtp" }} smtp: - host: {{ .smtp_server }} - port: {{ .smtp_port }} - username: {{ .smtp_user }} + host: {{ .server }} + port: {{ .port }} + username: {{ .user }} # password: {{- end }} diff --git a/core/grafana.nomad b/core/grafana.nomad index 12fc10e..452c96b 100644 --- a/core/grafana.nomad +++ b/core/grafana.nomad @@ -155,10 +155,12 @@ SELECT 'NOOP'; template { data = <