Use postgresql_db module to recreate koji stg db

This commit is contained in:
Mikolaj Izdebski 2018-02-28 00:48:22 +00:00
parent d1b11e0dbc
commit a2899a7817

View file

@ -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