Rework matrix_mautrix_twitter_database_* variables a bit

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1682

Previously, when matrix-postgres was disabled, we were setting
`matrix_mautrix_twitter_database_engine` to an invalid empty value.

Now, we always hardcode `matrix_mautrix_twitter_database_engine: postgres`,
but set/unset the database hostname and password values instead.
This commit is contained in:
Slavi Pantaleev
2022-03-08 08:10:40 +02:00
parent 1bea072484
commit 8c25ade9fb
3 changed files with 6 additions and 14 deletions

View File

@ -8,11 +8,5 @@
with_items:
- "matrix_mautrix_twitter_appservice_token"
- "matrix_mautrix_twitter_homeserver_token"
- name: Fail if database is not defined
fail:
msg: >-
You need to define a need to set `matrix_mautrix_twitter_database_engine: postgres` and redefine the other `matrix_mautrix_twitter_database_*` variables
when: "vars[item] == ''"
with_items:
- "matrix_mautrix_twitter_database_engine"
- "matrix_mautrix_twitter_database_hostname"
- "matrix_mautrix_twitter_database_password"