Allow staging mbs to use koji content generator

This commit is contained in:
Mikolaj Izdebski 2018-03-08 03:17:15 +00:00
parent e4eec6ddea
commit beb0966299
2 changed files with 12 additions and 0 deletions

View file

@ -49,6 +49,10 @@
arches: ppc64le
- name: buildvm-s390x-stg
arches: s390x
# Users allowed to use content generators, only in staging
- cg_users:
- user_name: mbs/mbs.stg.fedoraproject.org
cg_name: module-build-service
vars_files:
- /srv/web/infra/ansible/vars/global.yml

View file

@ -104,6 +104,14 @@ insert into user_perms (user_id, perm_id, active, creator_id) values (
(select id from users where name='{{username}}'));
{% endfor %}
-- Allow some users to use content generators, only in staging.
{% for cg_user in cg_users %}
insert into cg_users (cg_id, user_id, creator_id) values (
(select id from content_generator where name='{{ gc_user.gc_name }}'),
(select id from users where name='{{ gc_user.user_name }}'),
(select id from users where name='{{ gc_user.user_name }}'));
{% endfor %}
-- Fix krb principals for some users
{% for username, principal in [('releng', 'compose/koji.stg.fedoraproject.org'),
('koschei', 'koschei/koschei-backend01.stg.phx2.fedoraproject.org'),