mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-12-14 21:04:47 +00:00
@@ -3,21 +3,25 @@
|
||||
# Pre-checks
|
||||
|
||||
- name: Fail if playbook called incorrectly
|
||||
fail: msg="The `server_path_postgres_dump` variable needs to be provided to this playbook, via --extra-vars"
|
||||
fail:
|
||||
msg: "The `server_path_postgres_dump` variable needs to be provided to this playbook, via --extra-vars"
|
||||
when: "server_path_postgres_dump is not defined or server_path_postgres_dump.startswith('<')"
|
||||
|
||||
- name: Check if the provided Postgres dump file exists
|
||||
stat: path="{{ server_path_postgres_dump }}"
|
||||
stat:
|
||||
path: "{{ server_path_postgres_dump }}"
|
||||
register: result_server_path_postgres_dump_stat
|
||||
|
||||
- name: Fail if provided Postgres dump file doesn't exists
|
||||
fail: msg="File cannot be found on the server at {{ server_path_postgres_dump }}"
|
||||
fail:
|
||||
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"
|
||||
fail:
|
||||
msg: "Could not find existing Postgres installation"
|
||||
when: "not matrix_postgres_detected_existing"
|
||||
|
||||
|
||||
@@ -32,7 +36,10 @@
|
||||
# Actual import work
|
||||
|
||||
- name: Ensure matrix-postgres is started
|
||||
service: name=matrix-postgres state=started daemon_reload=yes
|
||||
service:
|
||||
name: matrix-postgres
|
||||
state: started
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Wait a bit, so that Postgres can start
|
||||
wait_for:
|
||||
|
||||
Reference in New Issue
Block a user