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.
This commit is contained in:
2018-08-12 09:33:08 -05:00
parent 943cdddc23
commit 760d3f4aec
7 changed files with 285 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
- 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;"