ansible-role-kojihub/templates/koji-pgsql.sql.j2
2020-12-27 13:37:02 -07:00

10 lines
927 B
Django/Jinja

with user_id as (insert into users (name, status, usertype) values ('{{ koji_admin_user }}', 0, 0) returning id)
insert into user_krb_principals (user_id, krb_principal) values ((select id from user_id),'{{ koji_admin_principal }}');
insert into user_perms (user_id, perm_id, creator_id) values (1, 1, 1);
with user_id as (insert into users (name, status, usertype) values ('{{ koji_kojira_user_kerb }}', 0, 0) returning id)
insert into user_krb_principals (user_id, krb_principal) values ((select id from user_id),'{{ koji_kojira_principal }}');
INSERT INTO user_perms (user_id, perm_id, creator_id) VALUES (2, 10, 1);
with user_id as (insert into users (name, status, usertype) values ('{{ koji_mbs_user_kerb }}', 0, 0) returning id)
insert into user_krb_principals (user_id, krb_principal) values ((select id from user_id),'{{ koji_mbs_principal }}');
INSERT INTO user_perms (user_id, perm_id, creator_id) VALUES (3, 1, 1);