diff --git a/roles/matrix-server/defaults/main.yml b/roles/matrix-server/defaults/main.yml index 25070d6f..e8ab727a 100644 --- a/roles/matrix-server/defaults/main.yml +++ b/roles/matrix-server/defaults/main.yml @@ -75,7 +75,7 @@ matrix_synapse_additional_loggers: [] # any password providers have been enabled or not. matrix_synapse_password_providers_enabled: false -# Enable this to activate the REST auth password provider module +# Enable this to activate the REST auth password provider module. # See: https://github.com/kamax-io/matrix-synapse-rest-auth matrix_synapse_ext_password_provider_rest_auth_enabled: false matrix_synapse_ext_password_provider_rest_auth_download_url: "https://raw.githubusercontent.com/kamax-io/matrix-synapse-rest-auth/v0.1.1/rest_auth_provider.py" diff --git a/roles/matrix-server/tasks/setup_synapse_ext_rest_auth.yml b/roles/matrix-server/tasks/setup_synapse_ext_rest_auth.yml index 85098c0a..fa4c2f9e 100644 --- a/roles/matrix-server/tasks/setup_synapse_ext_rest_auth.yml +++ b/roles/matrix-server/tasks/setup_synapse_ext_rest_auth.yml @@ -8,9 +8,11 @@ get_url: url: "{{ matrix_synapse_ext_password_provider_rest_auth_download_url }}" dest: "{{ matrix_synapse_ext_path }}/rest_auth_provider.py" + force: true mode: 0440 owner: "{{ matrix_user_username }}" group: "{{ matrix_user_username }}" + when: "matrix_synapse_ext_password_provider_rest_auth_enabled" - set_fact: matrix_synapse_password_providers_enabled: true