Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

18 lines
817 B

  1. ---
  2. - name: Ensure Dendrite user registered - {{ user.username | quote }}
  3. ansible.builtin.command:
  4. cmd: |-
  5. {{ matrix_host_command_docker }} exec matrix-dendrite
  6. create-account
  7. -config /data/dendrite.yaml
  8. -username {{ user.username | quote }}
  9. -password {{ user.initial_password | quote }}
  10. {% if user.initial_type == 'admin' %}
  11. -admin
  12. {% endif %}
  13. -url http://localhost:{{ matrix_dendrite_http_bind_port }}
  14. register: matrix_dendrite_register_user_result
  15. changed_when: matrix_dendrite_register_user_result.rc == 0 and 'Desired user ID is already taken' not in matrix_dendrite_register_user_result.stderr
  16. failed_when: matrix_dendrite_register_user_result.rc != 0 and 'Desired user ID is already taken' not in matrix_dendrite_register_user_result.stderr