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.
 
 

235 lines
5.8 KiB

  1. # Load initial hosting and organisation variables from AWX volume
  2. - include_tasks:
  3. file: "load_hosting_and_org_variables.yml"
  4. apply:
  5. tags: always
  6. when: run_setup|bool and matrix_awx_enabled|bool
  7. tags:
  8. - always
  9. # Renames the variables if needed
  10. - include_tasks:
  11. file: "rename_variables.yml"
  12. apply:
  13. tags: always
  14. when: run_setup|bool and matrix_awx_enabled|bool
  15. tags:
  16. - always
  17. # Perform a backup of the server
  18. - include_tasks:
  19. file: "backup_server.yml"
  20. apply:
  21. tags: backup-server
  22. when: run_setup|bool and matrix_awx_enabled|bool
  23. tags:
  24. - backup-server
  25. # Abort Subscription Deletion
  26. - include_tasks:
  27. file: "abort_deletion.yml"
  28. apply:
  29. tags: delete-subscription
  30. when: run_setup|bool and matrix_awx_enabled|bool
  31. tags:
  32. - delete-subscription
  33. # Delete DigitalOcean Droplet/Space
  34. - include_tasks:
  35. file: "delete_server.yml"
  36. apply:
  37. tags: delete-subscription
  38. when: run_setup|bool and matrix_awx_enabled|bool
  39. tags:
  40. - delete-subscription
  41. # Delete MailGun SMTP Account
  42. - include_tasks:
  43. file: "delete_mailgun.yml"
  44. apply:
  45. tags: delete-subscription
  46. when: run_setup|bool and matrix_awx_enabled|bool
  47. tags:
  48. - delete-subscription
  49. # Delete AWX Job Templates for Server
  50. - include_tasks:
  51. file: "delete_awx_templates.yml"
  52. apply:
  53. tags: delete-subscription
  54. when: run_setup|bool and matrix_awx_enabled|bool
  55. tags:
  56. - delete-subscription
  57. # Delete Organisation Directories
  58. - include_tasks:
  59. file: "delete_subscription_directory.yml"
  60. apply:
  61. tags: delete-subscription
  62. when: run_setup|bool and matrix_awx_enabled|bool
  63. tags:
  64. - delete-subscription
  65. # Perform a export of the server
  66. - include_tasks:
  67. file: "export_server.yml"
  68. apply:
  69. tags: export-server
  70. when: run_setup|bool and matrix_awx_enabled|bool
  71. tags:
  72. - export-server
  73. # Create a user account if called
  74. - include_tasks:
  75. file: "create_user.yml"
  76. apply:
  77. tags: create-user
  78. when: run_setup|bool and matrix_awx_enabled|bool
  79. tags:
  80. - create-user
  81. # Purge local/remote media if called
  82. - include_tasks:
  83. file: "purge_media_main.yml"
  84. apply:
  85. tags: purge-media
  86. when: run_setup|bool and matrix_awx_enabled|bool
  87. tags:
  88. - purge-media
  89. # Purge Synapse database if called
  90. - include_tasks:
  91. file: "purge_database_main.yml"
  92. apply:
  93. tags: purge-database
  94. when: run_setup|bool and matrix_awx_enabled|bool
  95. tags:
  96. - purge-database
  97. # Import configs, media repo from /chroot/backup import
  98. - include_tasks:
  99. file: "import_awx.yml"
  100. apply:
  101. tags: import-awx
  102. when: run_setup|bool and matrix_awx_enabled|bool
  103. tags:
  104. - import-awx
  105. # Perform extra self-check functions
  106. - include_tasks:
  107. file: "self_check.yml"
  108. apply:
  109. tags: self-check
  110. when: run_setup|bool and matrix_awx_enabled|bool
  111. tags:
  112. - self-check
  113. # Create cached matrix_vars.yml file
  114. - include_tasks:
  115. file: "cache_matrix_variables.yml"
  116. apply:
  117. tags: always
  118. when: run_setup|bool and matrix_awx_enabled|bool
  119. tags:
  120. - always
  121. # Configure SFTP so user can upload a static website or access the servers export
  122. - include_tasks:
  123. file: "customise_website_access_export.yml"
  124. apply:
  125. tags: setup-nginx-proxy
  126. when: run_setup|bool and matrix_awx_enabled|bool
  127. tags:
  128. - setup-nginx-proxy
  129. # Additional playbook to set the variable file during Element configuration
  130. - include_tasks:
  131. file: "set_variables_element.yml"
  132. apply:
  133. tags: setup-client-element
  134. when: run_setup|bool and matrix_awx_enabled|bool
  135. tags:
  136. - setup-client-element
  137. # Additional playbook to set the variable file during Mailer configuration
  138. - include_tasks:
  139. file: "set_variables_mailer.yml"
  140. apply:
  141. tags: setup-mailer
  142. when: run_setup|bool and matrix_awx_enabled|bool
  143. tags:
  144. - setup-mailer
  145. # Additional playbook to set the variable file during Element configuration
  146. - include_tasks:
  147. file: "set_variables_element_subdomain.yml"
  148. apply:
  149. tags: setup-client-element-subdomain
  150. when: run_setup|bool and matrix_awx_enabled|bool
  151. tags:
  152. - setup-client-element-subdomain
  153. # Additional playbook to set the variable file during Synapse configuration
  154. - include_tasks:
  155. file: "set_variables_synapse.yml"
  156. apply:
  157. tags: setup-synapse
  158. when: run_setup|bool and matrix_awx_enabled|bool
  159. tags:
  160. - setup-synapse
  161. # Additional playbook to set the variable file during Jitsi configuration
  162. - include_tasks:
  163. file: "set_variables_jitsi.yml"
  164. apply:
  165. tags: setup-jitsi
  166. when: run_setup|bool and matrix_awx_enabled|bool
  167. tags:
  168. - setup-jitsi
  169. # Additional playbook to set the variable file during Ma1sd configuration
  170. - include_tasks:
  171. file: "set_variables_ma1sd.yml"
  172. apply:
  173. tags: setup-ma1sd
  174. when: run_setup|bool and matrix_awx_enabled|bool
  175. tags:
  176. - setup-ma1sd
  177. # Additional playbook to set the variable file during Corporal configuration
  178. - include_tasks:
  179. file: "set_variables_corporal.yml"
  180. apply:
  181. tags: setup-corporal
  182. when: run_setup|bool and matrix_awx_enabled|bool
  183. tags:
  184. - setup-corporal
  185. # Additional playbook to set the variable file during Dimension configuration
  186. - include_tasks:
  187. file: "set_variables_dimension.yml"
  188. apply:
  189. tags: setup-dimension
  190. when: run_setup|bool and matrix_awx_enabled|bool
  191. tags:
  192. - setup-dimension
  193. # Additional playbook to set the variable file during Synapse Admin configuration
  194. - include_tasks:
  195. file: "set_variables_synapse_admin.yml"
  196. apply:
  197. tags: setup-synapse-admin
  198. when: run_setup|bool and matrix_awx_enabled|bool
  199. tags:
  200. - setup-synapse-admin
  201. # Load newly formed matrix variables from AWX volume
  202. - include_tasks:
  203. file: "load_matrix_variables.yml"
  204. apply:
  205. tags: always
  206. when: run_setup|bool and matrix_awx_enabled|bool
  207. tags:
  208. - always