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.
 
 

78 líneas
2.5 KiB

  1. ---
  2. - name: Create user account @_janitor
  3. command: |
  4. /usr/local/bin/matrix-synapse-register-user _janitor {{ awx_janitor_user_password | quote }} 1
  5. register: cmd
  6. when: not awx_janitor_user_created|bool
  7. no_log: True
  8. - name: Update AWX janitor user created variable
  9. delegate_to: 127.0.0.1
  10. lineinfile:
  11. path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
  12. regexp: "^#? *{{ item.key | regex_escape() }}:"
  13. line: "{{ item.key }}: {{ item.value }}"
  14. insertafter: 'AWX Settings'
  15. with_dict:
  16. 'awx_janitor_user_created': 'true'
  17. when: not awx_janitor_user_created|bool
  18. - name: Create user account @_dimension
  19. command: |
  20. /usr/local/bin/matrix-synapse-register-user _dimension {{ awx_dimension_user_password | quote }} 0
  21. register: cmd
  22. when: not awx_dimension_user_created|bool
  23. no_log: True
  24. - name: Update AWX dimension user created variable
  25. delegate_to: 127.0.0.1
  26. lineinfile:
  27. path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
  28. regexp: "^#? *{{ item.key | regex_escape() }}:"
  29. line: "{{ item.key }}: {{ item.value }}"
  30. insertafter: 'AWX Settings'
  31. with_dict:
  32. 'awx_dimension_user_created': 'true'
  33. when: not awx_dimension_user_created|bool
  34. - name: Create user account @_mjolnir
  35. command: |
  36. /usr/local/bin/matrix-synapse-register-user _mjolnir {{ awx_mjolnir_user_password | quote }} 0
  37. register: cmd
  38. when: not awx_mjolnir_user_created|bool
  39. no_log: True
  40. - name: Update AWX dimension user created variable
  41. delegate_to: 127.0.0.1
  42. lineinfile:
  43. path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
  44. regexp: "^#? *{{ item.key | regex_escape() }}:"
  45. line: "{{ item.key }}: {{ item.value }}"
  46. insertafter: 'AWX Settings'
  47. with_dict:
  48. 'awx_mjolnir_user_created': 'true'
  49. when: not awx_mjolnir_user_created|bool
  50. - name: Ensure /chroot/website location has correct permissions
  51. file:
  52. path: /chroot/website
  53. state: directory
  54. owner: matrix
  55. group: matrix
  56. mode: '0770'
  57. when: awx_customise_base_domain_website is defined
  58. - name: Collect Discord AppService bot invite link if file exists
  59. command:
  60. cat /matrix/appservice-discord/config/invite_link
  61. register: awx_discord_appservice_link
  62. when: awx_appservice_discord_admin_user is defined
  63. args:
  64. removes: /matrix/appservice-discord/config/invite_link
  65. - name: Print Discord AppService bot link for user
  66. debug:
  67. msg: "{{ awx_discord_appservice_link.stdout }}"
  68. when: awx_discord_appservice_link.stdout is defined