bstinson / centos / releng

Forked from centos/releng 3 years ago
Clone
Blob Blame History Raw
# CentOS Infra koji tags tool

## Purpose
This ansible playbook will just use a list of tags/targets/tags to be inherited and update the koji instance to reflect the needed changes.

## Prerequisites on the machine used to control koji

 * ansible (tested with 2.9.x but should work with previous versions)
 * git clone of this repository
 * koji cli installed *and* configured (with a profile, see below)
 * [koji-ansible](https://github.com/ktdreyer/koji-ansible) : For you convenience, we have included needed tools here, so that this git repo is self-contained

## How to use it

Assuming that we have a koji profile named "mbox" , the following should work before even trying to use the playbook:

```
koji -p mbox moshimoshi
```

If it doesn't work, don't even try to use this tool, and configure koji properly (config file, mandatory x509 tls cert/private key etc)

This tool also uses the variable `koji_profile` to know which koji profile to use and also which variables file to source with lists.
In our case with "mbox", it will source the file vars/mbox.yml (apply same logic for other profiles if needed)

There is an example.yml (so for profile "example") that is provided for reference
Once you have your vars/{{ koji_profile }}.yml ready, you can start using the tool :

```
ansible-playbook create_koji_tags.yml 

```

This playbook will parse the variables file containings lists and will : 
 
 * create needed tags that would need to be inherited from default list
 * create koji target (including build tag and dest tags)
 * modify build tags based on inheritance, either coming from default list, or another list that can be used