@ -52,16 +52,16 @@
- name : Determine Postgres version to use (default to latest)
- name : Determine Postgres version to use (default to latest)
set_fact:
set_fact:
docker_postgres_image _to_use: "{{ docker_postgres_image _latest }}"
matrix_ docker_image_ postgres_to_use: "{{ matrix_ docker_image_ postgres_latest }}"
- name : Determine Postgres version to use (use 9.x, if detected)
- name : Determine Postgres version to use (use 9.x, if detected)
set_fact:
set_fact:
docker_postgres_image _to_use: "{{ docker_postgres_image _v9 }}"
matrix_ docker_image_ postgres_to_use: "{{ matrix_ docker_image_ postgres_v9 }}"
when : "pg_version.startswith('9.')"
when : "pg_version.startswith('9.')"
- name : Abort, if already at latest Postgres version
- name : Abort, if already at latest Postgres version
fail : msg="You are already running the latest Postgres version supported. Nothing to do"
fail : msg="You are already running the latest Postgres version supported. Nothing to do"
when : " docker_postgres_image _to_use == docker_postgres_image _latest"
when : " matrix_ docker_image_ postgres_to_use == matrix_ docker_image_ postgres_latest"
- name : Ensure matrix-synapse is stopped
- name : Ensure matrix-synapse is stopped
service : name=matrix-synapse state=stopped
service : name=matrix-synapse state=stopped
@ -81,7 +81,7 @@
--link matrix-postgres:postgres \
--link matrix-postgres:postgres \
--env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \
--env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \
-v {{ postgres_dump_dir }}:/out \
-v {{ postgres_dump_dir }}:/out \
{{ docker_postgres_image _to_use }} pg_dump -h postgres {{ matrix_postgres_db_name }} -f /out/{{ postgres_dump_name }}
{{ matrix_ docker_image_ postgres_to_use }} pg_dump -h postgres {{ matrix_postgres_db_name }} -f /out/{{ postgres_dump_name }}
- name : Ensure matrix-postgres is stopped
- name : Ensure matrix-postgres is stopped
service : name=matrix-postgres state=stopped
service : name=matrix-postgres state=stopped
@ -109,7 +109,7 @@
--link matrix-postgres:postgres \
--link matrix-postgres:postgres \
--env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \
--env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \
-v {{ postgres_dump_dir }}:/in:ro \
-v {{ postgres_dump_dir }}:/in:ro \
{{ docker_postgres_image _latest }} psql -h postgres -f /in/{{ postgres_dump_name }}
{{ matrix_ docker_image_ postgres_latest }} psql -h postgres -f /in/{{ postgres_dump_name }}
- name : Delete Postgres database dump file
- name : Delete Postgres database dump file
file:
file: