ソースを参照

Fix Postgres import when Postgres had never started

If this is a brand new server and Postgres had never started,
detecting it before we even start it is not possible.

This moves the logic, so that it happens later on, when Postgres
would have had the chance to start and possibly initialize
a new empty database.

Fixes #82 (Github issue)
pull/84/head
Slavi Pantaleev 7年前
コミット
8d186e5194
1個のファイルの変更7行の追加7行の削除
  1. +7
    -7
      roles/matrix-postgres/tasks/import_postgres.yml

+ 7
- 7
roles/matrix-postgres/tasks/import_postgres.yml ファイルの表示

@@ -22,13 +22,6 @@
msg: "File cannot be found on the server at {{ server_path_postgres_dump }}"
when: not result_server_path_postgres_dump_stat.stat.exists

- import_tasks: tasks/util/detect_existing_postgres_version.yml

- name: Abort, if no existing Postgres version detected
fail:
msg: "Could not find existing Postgres installation"
when: "not matrix_postgres_detected_existing"


# Defaults

@@ -52,6 +45,13 @@
delegate_to: 127.0.0.1
become: false

- import_tasks: tasks/util/detect_existing_postgres_version.yml

- name: Abort, if no existing Postgres version detected
fail:
msg: "Could not find existing Postgres installation"
when: "not matrix_postgres_detected_existing"

- name: Perform Postgres database import
command: |
/usr/bin/docker run --rm --name matrix-postgres-import \


読み込み中…
キャンセル
保存