From c4d2c8394ca90facc7605ab2bc16b4cc993b0c84 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 11 Nov 2021 15:42:34 +0200 Subject: [PATCH] Abort if on an unsupported Postgres version (v9.6) Official support ends today (2021-11-11). Synapse still supports v9.6, but we'd better force users to transition to newer versions anyway. --- roles/matrix-postgres/tasks/setup_postgres.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/matrix-postgres/tasks/setup_postgres.yml b/roles/matrix-postgres/tasks/setup_postgres.yml index 4294bc113..96a20d254 100644 --- a/roles/matrix-postgres/tasks/setup_postgres.yml +++ b/roles/matrix-postgres/tasks/setup_postgres.yml @@ -18,6 +18,11 @@ matrix_postgres_docker_image_to_use: "{{ matrix_postgres_docker_image_latest if matrix_postgres_detected_version_corresponding_docker_image == '' else matrix_postgres_detected_version_corresponding_docker_image }}" when: matrix_postgres_enabled|bool +- name: Abort if on an unsupported Postgres version + fail: + msg: "You're on Postgres {{ matrix_postgres_detected_version }}, which is no longer supported. To upgrade, see docs/maintenance-postgres.md" + when: "matrix_postgres_enabled|bool and matrix_postgres_detected_version.startswith('9.')" + - name: Inject warning if on an old version of Postgres set_fact: matrix_playbook_runtime_results: |