Files
configpolicy/roles/koji-hub/handlers/main.yml
Dustin C. Hatch 760d3f4aec roles/koji-hub: Deploy the Koji Hub
The *koji-hub* role installs and configures the Koji Hub. It requires
Apache and mod_wsgi. Management of client certificates must be done
externally.
2018-08-12 09:33:08 -05:00

15 lines
478 B
YAML

- name: load koji db schema
become: true
become_user: koji
shell:
psql {{ koji_db_name }} -f /usr/share/doc/koji-*/docs/schema.sql;
- name: create koji admin user
become: true
become_user: koji
command: >-
psql {{ koji_db_name }} -c "WITH newuser AS (
INSERT INTO users (name, status, usertype)
VALUES ('{{ koji_admin_user }}', 0, 0) RETURNING id)
INSERT INTO user_perms (user_id, perm_id, creator_id)
SELECT id, 1, id FROM newuser;"