diff options
Diffstat (limited to 'roles/synapse/templates/var')
3 files changed, 164 insertions, 0 deletions
diff --git a/roles/synapse/templates/var/lib/synapse/homeserver.yaml.j2 b/roles/synapse/templates/var/lib/synapse/homeserver.yaml.j2 new file mode 100644 index 0000000..8aefce7 --- /dev/null +++ b/roles/synapse/templates/var/lib/synapse/homeserver.yaml.j2 @@ -0,0 +1,96 @@ +server_name: {{ synapse_domain }} + +pid_file: {{ synapse_runtime_dir }}/homeserver.pid + +public_baseurl: https://{{ synapse_server_name }}:{{ synapse_client_port }}/ + +listeners: + - port: {{ synapse_local_client_port }} + tls: false + type: http + x_forwarded: true + bind_addresses: ['::1', '127.0.0.1'] + resources: + - names: [client] + compress: false + + - port: {{ synapse_local_federation_port }} + tls: false + type: http + x_forwarded: true + bind_addresses: ['::1', '127.0.0.1'] + resources: + - names: [federation] + compress: false + +email: + smtp_host: 127.0.0.1 + smtp_port: 25 + enable_tls: false + notif_from: {{ synapse_email_from | to_yaml }} + enable_notifs: {{ synapse_enable_email_notifications | bool | to_yaml }} + +client_base_url: https://{{ synapse_server_name }} + +database: + name: psycopg2 + args: + user: '{{ synapse_user }}' + database: '{{ synapse_db_name }}' + host: '{{ synapse_db_host }}' + cp_min: 5 + cp_max: 10 + keepalives_idle: 10 + keepalives_interval: 10 + keepalives_count: 3 + +log_config: {{ synapse_home }}/logging.config + +media_store_path: {{ synapse_home }}/media_store +max_upload_size: {{ synapse_max_upload_size | human_to_bytes }} + +url_preview_enabled: true +url_preview_ip_range_blacklist: {{ synapse_url_preview_blacklist | to_yaml }} +url_preview_ip_range_whitelist: {{ synapse_url_preview_whitelist | to_yaml }} + +enable_registration: {{ synapse_enable_registration | bool | to_yaml }} +registration_shared_secret: {{ synapse_registration_shared_secret | to_yaml }} + +{% if synapse_auto_join_rooms %} +auto_join_rooms: +{% for room in synapse_auto_join_rooms %} + - '#{{ room }}:{{ synapse_domain }}' +{% endfor %} +{% endif %} +autocreate_auto_join_rooms: true +autocreate_auto_join_rooms_federated: false + +turn_uris: ['turn:{{ synapse_turn_host }}'] +turn_shared_secret: {{ synapse_turn_secret }} +turn_allow_guests: false + +report_stats: false + +macaroon_secret_key: {{ synapse_macaroon_secret_key | to_yaml }} +form_secret: {{ synapse_form_secret | to_yaml }} + +signing_key_path: {{ synapse_home }}/{{ synapse_domain }}.signing.key + +trusted_key_servers: + - server_name: matrix.org +suppress_key_server_warning: true + +modules: + - module: ldap_auth_provider.LdapAuthProviderModule + config: + enabled: true + uri: {{ freeipa_ldap_uri | split | to_yaml }} + start_tls: true + base: {{ freeipa_user_basedn }} + attributes: + uid: matrixUsername + mail: mail + name: matrixUsername + bind_dn: uid={{ synapse_sysaccount_username }},{{ freeipa_sysaccount_basedn }} + bind_password: {{ synapse_sysaccount_password }} + filter: '(memberOf=cn={{ synapse_access_group }},{{ freeipa_group_basedn }})' diff --git a/roles/synapse/templates/var/lib/synapse/logging.config.j2 b/roles/synapse/templates/var/lib/synapse/logging.config.j2 new file mode 100644 index 0000000..216e9e8 --- /dev/null +++ b/roles/synapse/templates/var/lib/synapse/logging.config.j2 @@ -0,0 +1,23 @@ +version: 1 + +formatters: + journal_fmt: + format: '%(name)s: [%(request)s] %(message)s' + +filters: + context: + (): synapse.logging.context.LoggingContextFilter + request: "" + +handlers: + journal: + class: systemd.journal.JournalHandler + formatter: journal_fmt + filters: [context] + SYSLOG_IDENTIFIER: synapse + +root: + level: INFO + handlers: [journal] + +disable_existing_loggers: False diff --git a/roles/synapse/templates/var/www/element/config.json.j2 b/roles/synapse/templates/var/www/element/config.json.j2 new file mode 100644 index 0000000..3556704 --- /dev/null +++ b/roles/synapse/templates/var/www/element/config.json.j2 @@ -0,0 +1,45 @@ +{ + "default_server_config": { + "m.homeserver": { + "base_url": "https://{{ synapse_server_name }}:{{ synapse_client_port }}", + "server_name": "{{ synapse_domain }}" + }, + "m.identity_server": { + "base_url": null + } + }, + "disable_custom_urls": true, + "disable_guests": true, + "disable_login_language_selector": false, + "disable_3pid_login": true, + "brand": "Element", + "integrations_ui_url": null, + "integrations_rest_url": null, + "integrations_widgets_urls": null, + "bug_report_endpoint_url": null, + "uisi_autorageshake_app": "element-auto-uisi", + "default_country_code": "US", + "show_labs_settings": false, + "features": {}, + "default_federate": true, + "default_theme": "light", + "room_directory": { + "servers": ["{{ synapse_domain }}", "matrix.org"] + }, + "enable_presence_by_hs_url": { + "https://matrix.org": false, + "https://matrix-client.matrix.org": false + }, + "setting_defaults": { + "breadcrumbs": true + }, + "jitsi": { + "preferred_domain": "meet.element.io" + }, + "element_call": { + "url": "https://call.element.io", + "participant_limit": 8, + "brand": "Element Call" + }, + "map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx" +} |