Files
configpolicy/roles/nextcloud/templates/config.php.j2
Dustin C. Hatch 6b9b87a406 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.
2021-06-25 11:12:38 -05:00

70 lines
1.9 KiB
Django/Jinja

<?php
$CONFIG = array (
'config_is_read_only' => true,
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/usr/share/nextcloud/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/lib/nextcloud/apps',
'url' => '/apps-appstore',
'writable' => true,
),
),
'instanceid' => '{{ nextcloud_instanceid }}',
'passwordsalt' => '{{ nextcloud_passwordsalt }}',
'secret' => '{{ nextcloud_secret }}',
'trusted_proxies' =>
array (
{% for addr in nextcloud_trusted_proxies %}
{{ loop.index0 }} => '{{ addr }}',
{% endfor %}
),
'trusted_domains' =>
array (
{% for name in nextcloud_trusted_domains %}
{{ loop.index0 }} => '{{ name }}',
{% endfor %}
),
'datadirectory' => '/var/lib/nextcloud/data',
'dbtype' => 'pgsql',
'version' => '20.0.8.1',
'overwrite.cli.url' => 'https://{{ nextcloud_server_name }}',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => '{{ nextcloud_db_password }}',
'installed' => true,
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
'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',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
'timeout' => 0.0,
),
);