From 16e8accd13bb33a251749413a9fea9daa2558384 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 19 Jan 2019 15:16:38 +0100 Subject: [PATCH] add missing urlsplit for base url transformation --- tasks/install.yml | 4 ++-- templates/opt/matrix/config/homeserver.yml.j2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/install.yml b/tasks/install.yml index 7a1ea42..00ce7fd 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -34,9 +34,9 @@ virtualenv_command: /usr/bin/python3 -m venv - name: Create signing key - shell: "{{ matrix_base_dir }}/env/bin/python -c \"from signedjson import key; file = open('{{ matrix_conf_dir }}/{{ matrix_base_url }}.signing.key','w'); key.write_signing_keys(file, [key.generate_signing_key('first')]); file.close()\"" + shell: "{{ matrix_base_dir }}/env/bin/python -c \"from signedjson import key; file = open('{{ matrix_conf_dir }}/{{ matrix_base_url | urlsplit('hostname') }}.signing.key','w'); key.write_signing_keys(file, [key.generate_signing_key('first')]); file.close()\"" args: - creates: "{{ matrix_conf_dir }}/{{ matrix_base_url }}.signing.key" + creates: "{{ matrix_conf_dir }}/{{ matrix_base_url | urlsplit('hostname') }}.signing.key" notify: __matrix_restart - name: Deploy global config files diff --git a/templates/opt/matrix/config/homeserver.yml.j2 b/templates/opt/matrix/config/homeserver.yml.j2 index 6483ccd..cc51c5f 100644 --- a/templates/opt/matrix/config/homeserver.yml.j2 +++ b/templates/opt/matrix/config/homeserver.yml.j2 @@ -545,7 +545,7 @@ form_secret: "5l51Jk51RyULKH4RbeYdnI5P^ROOOktfj-nWgK0i8JT_sd-CC." ## Signing Keys ## # Path to the signing key to sign messages with -signing_key_path: "{{ matrix_conf_dir }}/{{ matrix_base_url }}.signing.key" +signing_key_path: "{{ matrix_conf_dir }}/{{ matrix_base_url | urlsplit('hostname') }}.signing.key" # The keys that the server used to sign messages with but won't use # to sign new messages. E.g. it has lost its private key