You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
780 B
21 lines
780 B
11 months ago
|
---
|
||
|
- name: Check if Koji build host is already exist
|
||
|
ansible.builtin.shell: "koji list-hosts | grep {{ koji_build_host }}"
|
||
|
ignore_errors: true
|
||
|
register: koji_list_hosts
|
||
|
changed_when: koji_list_hosts.rc != 0
|
||
|
|
||
|
- name: Add Koji build host
|
||
|
ansible.builtin.command: "koji add-host {{ koji_build_host }} i386 x86_64"
|
||
|
register: koji_add_host
|
||
|
when: koji_list_hosts.rc != 0
|
||
|
|
||
|
- name: Add Koji build host to createrepo channel
|
||
|
ansible.builtin.command: "koji add-host-to-channel {{ koji_build_host }} createrepo"
|
||
|
when: koji_list_hosts.rc != 0 and koji_build_host_createrepo is true
|
||
|
|
||
|
# TODO: make capacity configurable
|
||
|
- name: Set Koji build host capacity to 10
|
||
|
ansible.builtin.command: "koji edit-host {{ koji_build_host }} --capacity=10"
|
||
|
when: koji_list_hosts.rc != 0
|