2020-12-13 21:40:32 +02:00
|
|
|
---
|
2020-12-13 22:56:56 +02:00
|
|
|
|
2020-12-14 00:59:59 +02:00
|
|
|
- name: Ensure matrix-postgres is started
|
|
|
|
service:
|
|
|
|
name: matrix-postgres
|
|
|
|
state: started
|
|
|
|
daemon_reload: yes
|
|
|
|
register: matrix_postgres_service_start_result
|
2020-12-13 21:40:32 +02:00
|
|
|
|
2020-12-14 00:59:59 +02:00
|
|
|
- name: Wait a bit, so that Postgres can start
|
|
|
|
wait_for:
|
|
|
|
timeout: "{{ matrix_postgres_additional_databases_postgres_start_wait_timeout_seconds }}"
|
|
|
|
delegate_to: 127.0.0.1
|
|
|
|
become: false
|
|
|
|
when: "matrix_postgres_service_start_result.changed|bool"
|
|
|
|
|
|
|
|
- name: Create additional Postgres user and database
|
2020-12-14 00:25:13 +02:00
|
|
|
include_tasks: "{{ role_path }}/tasks/util/create_additional_database.yml"
|
|
|
|
with_items: "{{ matrix_postgres_additional_databases }}"
|
|
|
|
loop_control:
|
|
|
|
loop_var: additional_db
|
|
|
|
# Suppress logging to avoid dumping the credentials to the shell
|
|
|
|
no_log: true
|