2018-07-30 14:56:33 +00:00
|
|
|
---
|
2019-02-16 10:25:57 +00:00
|
|
|
- name: check that sypervision and deployment are compatible
|
|
|
|
fail:
|
|
|
|
msg: "Either both or neither of deployment and supervision method should be docker."
|
2019-02-17 23:47:45 +00:00
|
|
|
when: (matrix_synapse_supervision_method == "docker" and matrix_synapse_deployment_method != "docker") or
|
|
|
|
(matrix_synapse_deployment_method == "docker" and matrix_synapse_supervision_method != "docker")
|
2021-05-10 10:27:11 +00:00
|
|
|
tags: ['deploy', 'deploy-synapse']
|
2019-02-17 23:27:45 +00:00
|
|
|
|
2020-10-02 07:49:51 +00:00
|
|
|
- name: Fail if workers are enabled but no redis is configured for synapse
|
|
|
|
fail:
|
|
|
|
msg: "Redis needs to be enabled on synapse in order for workers to be able to be run"
|
|
|
|
when: matrix_synapse_workers_enabled|bool and not matrix_synapse_redis_enabled|bool
|
2021-05-10 10:27:11 +00:00
|
|
|
tags: ['deploy', 'deploy-synapse']
|
2020-10-02 07:49:51 +00:00
|
|
|
|
|
|
|
- name: prepare user, group and base directory
|
|
|
|
import_tasks: prepare.yml
|
2021-05-10 10:27:11 +00:00
|
|
|
tags: ['prepare', 'prepare-synapse',
|
|
|
|
'deploy', 'deploy-synapse']
|
2020-10-02 07:49:51 +00:00
|
|
|
|
|
|
|
- name: configure workers
|
|
|
|
import_tasks: configure_workers.yml
|
2021-05-10 10:27:11 +00:00
|
|
|
tags: ['deploy', 'deploy-synapse']
|
2020-10-02 07:49:51 +00:00
|
|
|
when: matrix_synapse_workers_enabled
|
|
|
|
|
|
|
|
- name: configure config overrides from workers
|
|
|
|
import_tasks: configure_worker_overrides.yml
|
2021-05-10 10:27:11 +00:00
|
|
|
tags: ['deploy', 'deploy-synapse']
|
2020-10-02 07:49:51 +00:00
|
|
|
when: matrix_synapse_workers_enabled
|
|
|
|
|
2018-07-30 14:56:33 +00:00
|
|
|
- name: configure synapse
|
2021-05-10 10:27:11 +00:00
|
|
|
include_tasks: configure.yml
|
|
|
|
tags: ['always']
|
2018-07-30 14:56:33 +00:00
|
|
|
|
2020-10-02 07:49:51 +00:00
|
|
|
- name: deploy workers
|
|
|
|
import_tasks: deploy_workers.yml
|
2021-05-10 10:27:11 +00:00
|
|
|
tags: ['deploy', 'deploy-synapse']
|
2020-10-02 07:49:51 +00:00
|
|
|
when: matrix_synapse_workers_enabled
|
|
|
|
|
2019-02-16 10:25:57 +00:00
|
|
|
- name: deploy synapse
|
2021-05-10 10:27:11 +00:00
|
|
|
include_tasks: deployment.yml
|
|
|
|
tags: ['always']
|
2019-02-16 10:25:57 +00:00
|
|
|
|
2018-07-30 14:56:33 +00:00
|
|
|
- name: configure service
|
|
|
|
import_tasks: systemd.yml
|
2021-05-10 10:27:11 +00:00
|
|
|
tags: ['deploy', 'deploy-synapse']
|
2019-02-16 10:25:57 +00:00
|
|
|
when: matrix_synapse_supervision_method == "systemd"
|