From 7d74dced282a9b0eaf075e26417f5a986f1b2032 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 12 Aug 2017 10:36:34 +0300 Subject: [PATCH] Disable TURN for guests and enable URL previews --- roles/matrix-server/tasks/setup_synapse.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/roles/matrix-server/tasks/setup_synapse.yml b/roles/matrix-server/tasks/setup_synapse.yml index 82555a5fe..3da3c7910 100644 --- a/roles/matrix-server/tasks/setup_synapse.yml +++ b/roles/matrix-server/tasks/setup_synapse.yml @@ -44,6 +44,25 @@ regexp: "^server_name:" line: 'server_name: "{{ hostname_identity }}"' +- name: Augment Matrix config (disable TURN for guests) + lineinfile: "dest={{ matrix_synapse_data_path }}/homeserver.yaml" + args: + regexp: "^turn_allow_guests:" + line: 'turn_allow_guests: False' + +- name: Augment Matrix config (enable URL previews) + lineinfile: "dest={{ matrix_synapse_data_path }}/homeserver.yaml" + args: + regexp: "^url_preview_enabled:" + line: 'url_preview_enabled: True' + +- name: Augment Matrix config (specify URL previews blacklist) + lineinfile: "dest={{ matrix_synapse_data_path }}/homeserver.yaml" + args: + regexp: "^url_preview_ip_range_blacklist:" + line: 'url_preview_ip_range_blacklist: ["127.0.0.0/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "100.64.0.0/10", "169.254.0.0/16"]' + insertafter: '^# url_preview_ip_range_blacklist:$' + - name: Augment Matrix config (change database from SQLite to Postgres) lineinfile: dest: "{{ matrix_synapse_data_path }}/homeserver.yaml"