Selaa lähdekoodia

Add warnings about using Borg backup with external Postgres

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1982
pull/1983/head
Slavi Pantaleev 3 vuotta sitten
vanhempi
commit
10a5b0d831
2 muutettua tiedostoa jossa 13 lisäystä ja 0 poistoa
  1. +7
    -0
      roles/matrix-backup-borg/tasks/setup_install.yml
  2. +6
    -0
      roles/matrix-postgres/tasks/detect_existing_postgres_version.yml

+ 7
- 0
roles/matrix-backup-borg/tasks/setup_install.yml Näytä tiedosto

@@ -1,6 +1,13 @@
--- ---


- block: - block:
- name: Fail with matrix_backup_borg_version advice if Postgres not enabled
ansible.builtin.fail:
msg: >-
You are not running a built-in Postgres server (`matrix_postgres_enabled: false`), so auto-detecting its version and setting `matrix_backup_borg_version` automatically based on that cannot happen.
Consider setting `matrix_backup_borg_version` to your Postgres version manually.
when: not matrix_postgres_enabled

- ansible.builtin.import_role: - ansible.builtin.import_role:
name: matrix-postgres name: matrix-postgres
tasks_from: detect_existing_postgres_version tasks_from: detect_existing_postgres_version


+ 6
- 0
roles/matrix-postgres/tasks/detect_existing_postgres_version.yml Näytä tiedosto

@@ -6,6 +6,12 @@
# This utility is intentionally not in `tasks/util`, because if it were, it wouldn't be possible # This utility is intentionally not in `tasks/util`, because if it were, it wouldn't be possible
# to include it in other roles via the import_role module: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/import_role_module.html # to include it in other roles via the import_role module: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/import_role_module.html



- name: Fail detection if expectation fails (Postgres not enabled)
ansible.builtin.fail:
msg: "Trying to detect the version of the built-in Postgres server, but Postgres installation is not enabled (`matrix_postgres_enabled: false`)"
when: not matrix_postgres_enabled

- name: Initialize Postgres version determination variables (default to empty) - name: Initialize Postgres version determination variables (default to empty)
ansible.builtin.set_fact: ansible.builtin.set_fact:
matrix_postgres_detection_pg_version_path: "{{ matrix_postgres_data_path }}/PG_VERSION" matrix_postgres_detection_pg_version_path: "{{ matrix_postgres_data_path }}/PG_VERSION"


Ladataan…
Peruuta
Tallenna