Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

71 righe
2.4 KiB

  1. ---
  2. - name: Create user account @janitor
  3. command: |
  4. /usr/local/bin/matrix-synapse-register-user janitor {{ matrix_awx_janitor_user_password | quote }} 1
  5. register: cmd
  6. when: not matrix_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. 'matrix_awx_janitor_user_created': 'true'
  17. when: not matrix_awx_janitor_user_created|bool
  18. - name: Create user account @dimension
  19. command: |
  20. /usr/local/bin/matrix-synapse-register-user dimension {{ matrix_awx_dimension_user_password | quote }} 0
  21. register: cmd
  22. when: not matrix_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. 'matrix_awx_dimension_user_created': 'true'
  33. when: not matrix_awx_dimension_user_created|bool
  34. - name: Create user account @mjolnir
  35. command: |
  36. /usr/local/bin/matrix-synapse-register-user mjolnir {{ matrix_awx_mjolnir_user_password | quote }} 0
  37. register: cmd
  38. when: not matrix_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. 'matrix_awx_mjolnir_user_created': 'true'
  49. when: not matrix_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: '0574'
  57. when: customise_base_domain_website is defined
  58. - name: Ensure erroneous /chroot/website/matrix-domain location doesn't exist
  59. file:
  60. path: /chroot/website/matrix-domain
  61. state: absent
  62. when: customise_base_domain_website is defined