Make use of the new --exists-ok flag for register_new_matrix_user

Related to https://github.com/element-hq/synapse/pull/17304
This commit is contained in:
Slavi Pantaleev 2024-07-04 09:48:05 +03:00
parent c72cf3a1da
commit 752de4406e

View File

@ -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