Closed Cadair closed 5 years ago
A next big task for the bridge roles (not just the Whatsapp bridge, but also all others) is to:
make it possible for the playbook to manage the configuration file. We currently only generate it once, ask the bridge to generate a registration.yaml
based on that, and then we never touch these files again from Ansible. This is annoying, because we can't make updates to the configuration and we force people to manage the configuration manually (which goes against the Ansible way to do things)
move the configuration away from a template file (e.g. roles/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2
) and into a few Ansible variables (default/base configuration + override configuration = final configuration). This way, we can let people override any setting they wish without us having to manually add additional variables for it. This has already been done in a few other roles (e.g. the matrix-mxisd
role; see: matrix_mxisd_configuration_yaml
, matrix_mxisd_configuration_extension_yaml
and the resulting/final matrix_mxisd_configuration
)
Someone had already expressed interest in attempting to implement the above this weekend. Hopefully we'll get a pull request soon!
This should be fixed by #207, which just got contributed by @tommes0815.
It adds:
config.yaml
and registration.yaml
), instead of how it used to be -- only configuring it once and letting you manage it by yourself manuallymatrix_mautrix_whatsapp_configuration_extension_yaml
variable which can be used to extend the default configuration (matrix_mautrix_whatsapp_configuration_yaml
)Example:
matrix_mautrix_whatsapp_configuration_extension_yaml: |
bridge:
permissions:
# Explicitly keep the default, although it possibly gets preserved during merging anyway.
"{{ matrix_mautrix_whatsapp_homeserver_domain }}": user
# Some addition
'@user:another.homeserver.example.com': user
Refer to the changelog entry as well: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#bc-break-whatsapp-bridge-configuration-is-now-entirely-managed-by-the-playbook
There is currently no way to do this through the playbook (and it will be overwritten if you do it manually)