From a2899a7817a69d10fd4befd1e88d31288a60a1f1 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Wed, 28 Feb 2018 00:48:22 +0000 Subject: [PATCH] Use postgresql_db module to recreate koji stg db --- playbooks/manual/staging-sync/koji.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/manual/staging-sync/koji.yml b/playbooks/manual/staging-sync/koji.yml index a0b250dfe6..03d425c37c 100644 --- a/playbooks/manual/staging-sync/koji.yml +++ b/playbooks/manual/staging-sync/koji.yml @@ -44,8 +44,8 @@ tasks: - template: src=templates/koji-reset-staging.sql dest=/var/lib/pgsql/koji-reset-staging.sql - - command: dropdb koji - - command: createdb -O koji koji + - postgresql_db: name=koji state=absent + - postgresql_db: name=koji owner=koji # buildroot_listing is excluded from the sync to save some time - name: Import the prod db. This will take quite a while. Go get a snack! shell: curl https://infrastructure.fedoraproject.org/infra/db-dumps/koji.dump.xz | xzcat | sed '/COPY buildroot_listing /,/\./d' | psql koji