mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-23 04:55:46 +00:00
330648a3e0
Related to #193, but for the Facebook bridge. (other bridges can be changed to do the same later). This patch makes the bridge configuration entirely managed by the Ansible playbook. The bridge's `config.yaml` and `registration.yaml` configuration files are regenerated every time the playbook runs. This allows us to apply updates to those files and to avoid people having to manage the configuration files manually on the server. ------------------------------------------------------------- A deficiency of the current approach to dumping YAML configuration in `config.yaml` is that we strip all comments from it. Later on, when the bridge actually starts, it will load and redump (this time with comments), which will make the `config.yaml` file change. Subsequent playbook runs will report "changed" for the "Ensure mautrix-facebook config.yaml installed" task, which is a little strange. We might wish to improve this in the future, if possible. Still, it's better to have a (usually) somewhat meaningless "changed" task than to what we had -- never rebuilding the configuration.
22 lines
612 B
YAML
22 lines
612 B
YAML
- import_tasks: "{{ role_path }}/tasks/init.yml"
|
|
tags:
|
|
- always
|
|
|
|
- import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
|
when: "run_setup|bool and matrix_mautrix_facebook_enabled|bool"
|
|
tags:
|
|
- setup-all
|
|
- setup-mautrix-facebook
|
|
|
|
- import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
|
when: "run_setup|bool and matrix_mautrix_facebook_enabled|bool"
|
|
tags:
|
|
- setup-all
|
|
- setup-mautrix-facebook
|
|
|
|
- import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
|
when: "run_setup|bool and not matrix_mautrix_facebook_enabled|bool"
|
|
tags:
|
|
- setup-all
|
|
- setup-mautrix-facebook
|