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:
14
roles/koji-hub/handlers/main.yml
Normal file
14
roles/koji-hub/handlers/main.yml
Normal 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;"
|
||||
Reference in New Issue
Block a user