Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

32 líneas
1.0 KiB

  1. ---
  2. - name: Fail if playbook called incorrectly
  3. fail:
  4. msg: "The `username` variable needs to be provided to this playbook, via --extra-vars"
  5. when: "username is not defined or username == '<your-username>'"
  6. - name: Fail if playbook called incorrectly
  7. fail:
  8. msg: "The `password` variable needs to be provided to this playbook, via --extra-vars"
  9. when: "password is not defined or password == '<your-password>'"
  10. - name: Fail if playbook called incorrectly
  11. fail:
  12. msg: "The `admin` variable needs to be provided to this playbook, via --extra-vars"
  13. when: "admin is not defined or admin not in ['yes', 'no']"
  14. - name: Ensure matrix-synapse is started
  15. service:
  16. name: matrix-synapse
  17. state: started
  18. daemon_reload: yes
  19. register: start_result
  20. - name: Wait a while, so that Synapse can manage to start
  21. pause:
  22. seconds: 7
  23. when: start_result.changed
  24. - name: Register user
  25. shell: "/usr/local/bin/matrix-synapse-register-user {{ username }} {{ password }} {{ '1' if admin == 'yes' else '0' }}"