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