mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-27 11:28:31 +01: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.
11 lines
284 B
YAML
11 lines
284 B
YAML
---
|
|
|
|
- name: Fail if required settings not defined
|
|
fail:
|
|
msg: >-
|
|
You need to define a required configuration setting (`{{ item }}`).
|
|
when: "vars[item] == ''"
|
|
with_items:
|
|
- "matrix_mautrix_facebook_appservice_token"
|
|
- "matrix_mautrix_facebook_homeserver_token"
|