roles/nextcloud: Configure outbound email

Since the Nextcloud configuration file is managed by the configuration
policy, all of the settings configurable through the web UI need to be
templated.  One important group of settings is the outbound email
configuration.  This can now be configured using the `nextcloud_smtp`
Ansible variable.
jenkins-master
Dustin 2021-06-25 11:12:38 -05:00
parent c68f10d771
commit 6b9b87a406
2 changed files with 12 additions and 0 deletions

View File

@ -13,3 +13,7 @@ nextcloud_trusted_domains:
- nextcloud.pyrocufflink.net
- nextcloud.pyrocufflink.blue
- '{{ ansible_fqdn }}'
nextcloud_smtp:
from: nextcloud@pyrocufflink.net
host: mail.pyrocufflink.blue
port: 25

View File

@ -49,6 +49,14 @@ $CONFIG = array (
'maintenance' => {{ nextcloud_maintenance|bool|string|lower }},
'theme' => '',
'loglevel' => 2,
{% if nextcloud_smtp is defined %}
'mail_from_address' => '{{ nextcloud_smtp.from.split("@")[0] }}',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => '{{ nextcloud_smtp.from.split("@")[1] }}',
'mail_smtphost' => '{{ nextcloud_smtp.host }}',
'mail_smtpport' => '{{ nextcloud_smtp.port }}',
{% endif %}
'filelocking.enabled' => true,
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',