diff --git a/group_vars/gitea.yml b/group_vars/gitea.yml index 9178c17..e0fc8ae 100644 --- a/group_vars/gitea.yml +++ b/group_vars/gitea.yml @@ -10,3 +10,8 @@ sshd_config_matches: burp_backup: - include: /var/lib/gitea + +gitea_smtp: + from: gitea@pyrocufflink.net + addr: mail.pyrocufflink.blue + port: 25 diff --git a/roles/gitea/templates/app.ini.j2 b/roles/gitea/templates/app.ini.j2 index b99f0c2..b46e12e 100644 --- a/roles/gitea/templates/app.ini.j2 +++ b/roles/gitea/templates/app.ini.j2 @@ -36,11 +36,23 @@ OFFLINE_MODE = false PATH = /var/lib/gitea/data/lfs [mailer] +{% if gitea_smtp|d %} +ENABLED = true +PROTOCOL = smtp +SMTP_ADDR = {{ gitea_smtp.addr }} +SMTP_PORT = {{ gitea_smtp.port }} +FROM = {{ gitea_smtp.from }} +{% else %} ENABLED = false +{% endif %} [service] REGISTER_EMAIL_CONFIRM = false +{% if gitea_smtp|d %} +ENABLE_NOTIFY_MAIL = true +{% else %} ENABLE_NOTIFY_MAIL = false +{% endif %} DISABLE_REGISTRATION = true ENABLE_CAPTCHA = false REQUIRE_SIGNIN_VIEW = false