Remove hardcoded matrix-postgres references

This commit is contained in:
Cody Wyatt Neiman 2023-01-02 19:23:14 -05:00
parent 97c45676de
commit d07480a883
No known key found for this signature in database
GPG Key ID: 94475C8B94E4698D
2 changed files with 7 additions and 6 deletions

View File

@ -63,7 +63,7 @@ matrix_mautrix_slack_sqlite_database_path_in_container: "/data/mautrix-slack.db"
matrix_mautrix_slack_database_username: 'matrix_mautrix_slack'
matrix_mautrix_slack_database_password: 'some-password'
matrix_mautrix_slack_database_hostname: 'matrix-postgres'
matrix_mautrix_slack_database_hostname: ''
matrix_mautrix_slack_database_port: 5432
matrix_mautrix_slack_database_name: 'matrix_mautrix_slack'

View File

@ -1,13 +1,14 @@
---
- name: Fail if required settings not defined
- name: Fail if required mautrix-slack settings not defined
ansible.builtin.fail:
msg: >-
You need to define a required configuration setting (`{{ item }}`).
when: "vars[item] == ''"
You need to define a required configuration setting (`{{ item.name }}`).
when: "item.when | bool and vars[item.name] == ''"
with_items:
- "matrix_mautrix_slack_appservice_token"
- "matrix_mautrix_slack_homeserver_token"
- {'name': 'matrix_mautrix_slack_appservice_token', when: true}
- {'name': 'matrix_mautrix_slack_homeserver_token', when: true}
- {'name': 'matrix_mautrix_slack_database_hostname', when: "{{ matrix_mautrix_slack_database_engine == 'postgres' }}"}
- name: Fail if appservice-slack and mautrix-slack have conflicting bot usernames
when: matrix_appservice_slack_enabled | default(False) | bool and matrix_mautrix_slack_appservice_bot_username == matrix_appservice_slack_bot_name | default ('')