From 411998beb70b353ac8e3402c7e7e08e1623b043f Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 17 May 2018 07:14:21 +0000 Subject: [PATCH] Make Koschei staging sync work with both BDR and non-BDR DBMS --- playbooks/manual/staging-sync/koschei.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/playbooks/manual/staging-sync/koschei.yml b/playbooks/manual/staging-sync/koschei.yml index b89ec34a29..cc4a108ac3 100644 --- a/playbooks/manual/staging-sync/koschei.yml +++ b/playbooks/manual/staging-sync/koschei.yml @@ -59,6 +59,17 @@ DROP TABLE resource_consumption_stats CASCADE; COMMIT; " + when: 'pgbdr' in koschei_pgsql_hostname + - postgresql_db: name=koschei state=absent + become: yes + become_user: postgres + delegate_to: "{{ koschei_pgsql_hostname }}" + when: 'pgbdr' not in koschei_pgsql_hostname + - postgresql_db: name=koschei owner=koscheiadmin + become: yes + become_user: postgres + delegate_to: "{{ koschei_pgsql_hostname }}" + when: 'pgbdr' not in koschei_pgsql_hostname - command: koschei-admin create-db - name: bring koschei staging services up