Sfoglia il codice sorgente

Add support for using a pre-configured Macaroon secret key

pull/6/head
Slavi Pantaleev 8 anni fa
parent
commit
57e4f12ad3
2 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. +4
    -0
      roles/matrix-server/defaults/main.yml
  2. +9
    -0
      roles/matrix-server/tasks/setup_synapse.yml

+ 4
- 0
roles/matrix-server/defaults/main.yml Vedi File

@@ -43,6 +43,10 @@ docker_nginx_image: "nginx:1.13.5-alpine"
docker_riot_image: "silviof/matrix-riot-docker:latest" docker_riot_image: "silviof/matrix-riot-docker:latest"
docker_s3fs_image: "xueshanf/s3fs:latest" docker_s3fs_image: "xueshanf/s3fs:latest"


# To avoid Synapse's macaroon secret key from changing every time
# a new config is built from scratch, you can specify one here.
matrix_synapse_macaroon_secret_key: null

# UDP port-range to use for TURN # UDP port-range to use for TURN
matrix_coturn_turn_udp_min_port: 49152 matrix_coturn_turn_udp_min_port: 49152
matrix_coturn_turn_udp_max_port: 49172 matrix_coturn_turn_udp_max_port: 49172


+ 9
- 0
roles/matrix-server/tasks/setup_synapse.yml Vedi File

@@ -76,6 +76,15 @@
- {"regexp": "^max_upload_size:", "line": 'max_upload_size: "{{ matrix_max_upload_size_mb }}M"'} - {"regexp": "^max_upload_size:", "line": 'max_upload_size: "{{ matrix_max_upload_size_mb }}M"'}
- {"regexp": "^media_store_path:", "line": 'media_store_path: "/matrix-media-store"'} - {"regexp": "^media_store_path:", "line": 'media_store_path: "/matrix-media-store"'}


- name: Augment Matrix config (configure Macaroon secret)
lineinfile: "dest={{ matrix_synapse_config_dir_path }}/homeserver.yaml"
args:
regexp: "{{ item.regexp }}"
line: '{{ item.line }}'
with_items:
- {"regexp": "^macaroon_secret_key:", "line": 'macaroon_secret_key: "{{ matrix_synapse_macaroon_secret_key }}"'}
when: "matrix_synapse_macaroon_secret_key is not none"

- name: Augment Matrix config (specify URL previews blacklist) - name: Augment Matrix config (specify URL previews blacklist)
lineinfile: "dest={{ matrix_synapse_config_dir_path }}/homeserver.yaml" lineinfile: "dest={{ matrix_synapse_config_dir_path }}/homeserver.yaml"
args: args:


Caricamento…
Annulla
Salva