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.
 
 

24 regels
986 B

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