- when:matrix_backup_borg_postgresql_enabled | bool and matrix_backup_borg_version == ''
- when:matrix_backup_borg_postgresql_enabled | bool and matrix_backup_borg_version == ''
block:
block:
- name:Fail with matrix_backup_borg_version advice if Postgres not enabled
- name:Fail with matrix_backup_borg_version advice if Postgres not enabled
ansible.builtin.fail:
ansible.builtin.fail:
msg:>-
msg:>-
You are not running a built-in Postgres server (`devture_postgres_enabled:false`), so auto-detecting its version and setting `matrix_backup_borg_version` automatically based on that cannot happen.
You are not running a built-in Postgres server (`devture_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.
Consider setting `matrix_backup_borg_version` to your Postgres version manually.
when:not devture_postgres_enabled
when:not devture_postgres_enabled
- ansible.builtin.include_role:
- ansible.builtin.include_role:
name:galaxy/com.devture.ansible.role.postgres
name:galaxy/com.devture.ansible.role.postgres
tasks_from:detect_existing_postgres_version
tasks_from:detect_existing_postgres_version
- name:Fail if detected Postgres version is unsupported
- name:Fail if detected Postgres version is unsupported
ansible.builtin.fail:
ansible.builtin.fail:
msg:"You cannot use borg backup with such an old version ({{ devture_postgres_detected_version }}) of Postgres. Consider upgrading - link to docs for upgrading Postgres: docs/maintenance-postgres.md#upgrading-postgresql"
msg:"You cannot use borg backup with such an old version ({{ devture_postgres_detected_version }}) of Postgres. Consider upgrading - link to docs for upgrading Postgres: docs/maintenance-postgres.md#upgrading-postgresql"
when:"devture_postgres_detected_version not in matrix_backup_borg_supported_postgres_versions"
when:"devture_postgres_detected_version not in matrix_backup_borg_supported_postgres_versions"