From 1f41d3a6bc4f26df59f425048d54e3dcb02644be Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 15 Jan 2024 08:26:05 +0100 Subject: [PATCH] Implemented seperate registrations folder --- roles/docker-matrix-compose/tasks/main.yml | 8 +++++++- .../docker-matrix-compose/templates/docker-compose.yml.j2 | 5 ++--- .../templates/mautrix-whatsapp.config.yml.j2 | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/roles/docker-matrix-compose/tasks/main.yml b/roles/docker-matrix-compose/tasks/main.yml index 5a39d1a9..814c0ae5 100644 --- a/roles/docker-matrix-compose/tasks/main.yml +++ b/roles/docker-matrix-compose/tasks/main.yml @@ -22,7 +22,13 @@ database_name: "{{ item.database_name }}" loop: "{{ bridges }}" -- name: "create bridge volume folders" +- name: "create registrations folder" + file: + path: "{{docker_compose_instance_directory}}registrations" + state: directory + mode: 0755 + +- name: "create bridge folders" file: path: "{{docker_compose_instance_directory}}{{item.bridge_name}}" state: directory diff --git a/roles/docker-matrix-compose/templates/docker-compose.yml.j2 b/roles/docker-matrix-compose/templates/docker-compose.yml.j2 index 6b37afa9..d8bf4dfc 100644 --- a/roles/docker-matrix-compose/templates/docker-compose.yml.j2 +++ b/roles/docker-matrix-compose/templates/docker-compose.yml.j2 @@ -14,7 +14,7 @@ services: - synapse_data:/data - ./homeserver.yaml:/data/homeserver.yaml:ro - ./{{synapse_domain}}.log.config:/data/{{synapse_domain}}.log.config:ro - - registration_files:{{registration_file_folder}} + - ./registrations:{{registration_file_folder}} environment: - SYNAPSE_SERVER_NAME={{synapse_domain}} - SYNAPSE_REPORT_STATS=no @@ -40,13 +40,12 @@ services: restart: {{docker_restart_policy}} volumes: - ./{{item.bridge_name}}:/data - - registration_files:{{registration_file_folder}} + - ./registrations:{{registration_file_folder}} {% include 'templates/docker-container-networks.yml.j2' %} {% endfor %} {% include 'templates/docker-compose-volumes.yml.j2' %} synapse_data: - registration_files: {% include 'templates/docker-compose-networks.yml.j2' %} \ No newline at end of file diff --git a/roles/docker-matrix-compose/templates/mautrix-whatsapp.config.yml.j2 b/roles/docker-matrix-compose/templates/mautrix-whatsapp.config.yml.j2 index 083d405f..234ffe32 100644 --- a/roles/docker-matrix-compose/templates/mautrix-whatsapp.config.yml.j2 +++ b/roles/docker-matrix-compose/templates/mautrix-whatsapp.config.yml.j2 @@ -419,7 +419,7 @@ bridge: prefix: /_matrix/provision # Shared secret for authentication. If set to "generate", a random secret will be generated, # or if set to "disable", the provisioning API will be disabled. - shared_secret: {{mautrix_whatsapp_bridge_provisioning_shared_secret}} + shared_secret: generate # Enable debug API at /debug with provisioning authentication. debug_endpoints: false