Setup SMTP mailing

This commit is contained in:
Luke Murphy 2020-03-27 18:40:10 +01:00
parent 517b3322f1
commit 17ece2d1b5
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
4 changed files with 24 additions and 0 deletions

View File

@ -99,8 +99,13 @@
HTTP_PORT: "{{ http_port }}"
INSTALL_LOCK: "{{ install_lock }}"
JWT_SECRET: "{{ jwt_secret }}"
MAILER_ENABLED: "{{ mailer_enabled }}"
RUN_MODE: "prod"
SECRET_KEY: "{{ secret_key}}"
SMTP_FROM: "{{ smtp_from }}"
SMTP_HOST: "{{ smtp_host }}"
SMTP_TLS_ENABLED: "{{ smtp_tls_enabled }}"
SMTP_USER: "{{ smtp_user }}"
SSH_DOMAIN: "{{ ssh_domain }}"
SSH_LISTEN_PORT: "{{ ssh_listen_port }}"
SSH_PORT: "{{ ssh_port }}"

View File

@ -11,6 +11,11 @@ enable_openid_signin: "true"
enable_openid_signup: "true"
http_port: "3020"
install_lock: "true"
mailer_enabled: "true"
smtp_from: "gitea-autonomic@decentral1.se"
smtp_host: "mail.gandi.net"
smtp_tls_enabled: "true"
smtp_user: "gitea-autonomic@decentral1.se"
ssh_domain: "git.autonomic.zone"
ssh_listen_port: "2222"
ssh_port: "222"

View File

@ -0,0 +1,8 @@
---
smtp_passwd: !vault |
$ANSIBLE_VAULT;1.1;AES256
62393535383032333039343365653034353739323962356536386461346534643831303465353865
6662326163653231663036313663353135613131373131610a336131393862333533356536313565
34663065323635326532343537623564363164333965313538306637636136353361373265363264
3832643061366636390a333362326663343066646335303465633163316530306563366463393538
37366337663562333231326162326139313037643962613430623832656365623534

View File

@ -80,6 +80,12 @@ setup_app_ini() {
crudini --set "$app_ini" openid WHITELIST_URIS "${WHITELIST_URIS}"
crudini --set "$app_ini" indexer STARTUP_TIMEOUT "${STARTUP_TIMEOUT}"
crudini --set "$app_ini" mailer ENABLED "${MAILER_ENABLED}"
crudini --set "$app_ini" mailer FROM "${SMTP_FROM}"
crudini --set "$app_ini" mailer HOST "${SMTP_HOST}"
crudini --set "$app_ini" mailer USER "${USER}"
crudini --set "$app_ini" mailer PASSWD "${PASSWD}"
}
main() {