From 752de4406eaeafa89cd208efaa9dc3ac03daa2f2 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 4 Jul 2024 09:48:05 +0300 Subject: [PATCH] Make use of the new --exists-ok flag for register_new_matrix_user Related to https://github.com/element-hq/synapse/pull/17304 --- .../tasks/util/ensure_user_registered_synapse.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/custom/matrix-user-creator/tasks/util/ensure_user_registered_synapse.yml b/roles/custom/matrix-user-creator/tasks/util/ensure_user_registered_synapse.yml index 00189e5c5..753573415 100644 --- a/roles/custom/matrix-user-creator/tasks/util/ensure_user_registered_synapse.yml +++ b/roles/custom/matrix-user-creator/tasks/util/ensure_user_registered_synapse.yml @@ -16,7 +16,7 @@ --user_type={{ user.initial_type | quote }} {% endif %} {% endif %} + --exists-ok http://localhost:{{ matrix_synapse_container_client_api_port }} register: matrix_synapse_register_user_result - changed_when: matrix_synapse_register_user_result.rc == 0 and 'User ID already taken' not in matrix_synapse_register_user_result.stdout - failed_when: matrix_synapse_register_user_result.rc != 0 and 'User ID already taken' not in matrix_synapse_register_user_result.stdout + changed_when: matrix_synapse_register_user_result.rc == 0 and 'User already exists' not in matrix_synapse_register_user_result.stdout