|
|
6e61fb |
# CentOS Infra koji tags tool
|
|
|
6e61fb |
|
|
|
6e61fb |
## Purpose
|
|
|
6e61fb |
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.
|
|
|
6e61fb |
|
|
|
6e61fb |
## Prerequisites on the machine used to control koji
|
|
|
6e61fb |
|
|
|
6e61fb |
* ansible (tested with 2.9.x but should work with previous versions)
|
|
|
6e61fb |
* git clone of this repository
|
|
|
6e61fb |
* koji cli installed *and* configured (with a profile, see below)
|
|
|
6e61fb |
* [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
|
|
|
6e61fb |
|
|
|
6e61fb |
## How to use it
|
|
|
6e61fb |
|
|
|
6e61fb |
Assuming that we have a koji profile named "mbox" , the following should work before even trying to use the playbook:
|
|
|
6e61fb |
|
|
|
6e61fb |
```
|
|
|
6e61fb |
koji -p mbox moshimoshi
|
|
|
6e61fb |
```
|
|
|
6e61fb |
|
|
|
6e61fb |
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)
|
|
|
6e61fb |
|
|
|
6e61fb |
This tool also uses the variable `koji_profile` to know which koji profile to use and also which variables file to source with lists.
|
|
|
6e61fb |
In our case with "mbox", it will source the file vars/mbox.yml (apply same logic for other profiles if needed)
|
|
|
6e61fb |
|
|
|
6e61fb |
There is an example.yml (so for profile "example") that is provided for reference
|
|
|
6e61fb |
Once you have your vars/{{ koji_profile }}.yml ready, you can start using the tool :
|
|
|
6e61fb |
|
|
|
6e61fb |
```
|
|
|
6e61fb |
ansible-playbook create_koji_tags.yml
|
|
|
6e61fb |
|
|
|
6e61fb |
```
|
|
|
6e61fb |
|
|
|
6e61fb |
This playbook will parse the variables file containings lists and will :
|
|
|
6e61fb |
|
|
|
6e61fb |
* create needed tags that would need to be inherited from default list
|
|
|
6e61fb |
* create koji target (including build tag and dest tags)
|
|
|
6e61fb |
* modify build tags based on inheritance, either coming from default list, or another list that can be used
|
|
|
6e61fb |
|
|
|
6e61fb |
|