2019-01-16 16:05:48 +00:00
---
- name : (Deprecation) Warn about matrix_postgres_use_external usage
2022-07-18 07:39:08 +00:00
ansible.builtin.fail :
2019-01-16 16:05:48 +00:00
msg : >
The `matrix_postgres_use_external` variable defined in your configuration is not used by this playbook anymore!
You'll need to adapt to the new way of using an external Postgres server.
It's a combination of `matrix_postgres_enabled : false ` and specifying Postgres connection
2021-01-22 10:23:00 +00:00
details in a few `matrix_postgres_connection_` variables.
2019-01-16 16:05:48 +00:00
See the "Using an external PostgreSQL server (optional)" documentation page.
when : "'matrix_postgres_use_external' in vars"
2021-01-22 10:23:00 +00:00
# This is separate (from the other required variables below),
# because we'd like to have a friendlier message for our existing users.
- name : Fail if matrix_postgres_connection_password not defined
2022-07-18 07:39:08 +00:00
ansible.builtin.fail :
2021-01-22 10:23:00 +00:00
msg : >-
The playbook no longer has a default Postgres password defined in the `matrix_postgres_connection_password` variable, among lots of other Postgres changes.
You need to perform multiple manual steps to resolve this.
See our changelog for more details :
https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#breaking-change-postgres-changes-that-require-manual-intervention
when : "matrix_postgres_connection_password == ''"
2019-01-16 16:05:48 +00:00
- name : Fail if required Postgres settings not defined
2022-07-18 07:39:08 +00:00
ansible.builtin.fail :
2021-01-22 10:23:00 +00:00
msg : >-
2019-06-07 13:07:01 +00:00
You need to define a required configuration setting (`{{ item }}`).
2019-01-16 16:05:48 +00:00
when : "vars[item] == ''"
with_items :
- "matrix_postgres_connection_hostname"
2021-01-22 10:23:00 +00:00
- "matrix_postgres_connection_port"
2019-01-16 16:05:48 +00:00
- "matrix_postgres_connection_username"
- "matrix_postgres_connection_password"
2019-06-07 13:07:01 +00:00
- "matrix_postgres_db_name"
2020-11-26 07:51:48 +00:00
- name : Fail if Postgres password length exceeded
2022-07-18 07:39:08 +00:00
ansible.builtin.fail :
2020-11-26 07:51:48 +00:00
msg : "The maximum `matrix_postgres_connection_password` length is 99 characters"
2022-09-18 09:21:09 +00:00
when : "matrix_postgres_connection_password | length > 99"