[kojid]
; The number of seconds to sleep between tasks
; sleeptime=15

{% if host in groups['buildvm-s390x'] and host in groups['runroot'] %}
; The maximum number of jobs that kojid will handle at a time
maxjobs=1
{% else %}
; The maximum number of jobs that kojid will handle at a time
maxjobs=25
{% endif %}

; The minimum amount of free space (in MBs) required for each build root
; minspace=8192

; The directory root where work data can be found from the koji hub
; topdir=/mnt/koji

; Disable keepalive for now since it's not working in f23.
keepalive=False

rpmbuild_timeout=172800

; Set oz timeout higher to allow aarch64, ppc64{le} and s390x to finish.
; Install timeout(seconds) for image build
; if it's unset, use the number in /etc/oz/oz.cfg, supported since oz-0.16.0
oz_install_timeout=14400
use_createrepo_c=True

{% if host in groups['buildvm-s390x'] %}
# s390x builders use a local varnish cache
topurl = http://kojipkgs-cache01.s390.fedoraproject.org https://kojipkgs01.fedoraproject.org https://kojipkgs02.fedoraproject.org
{% elif host in groups['buildvm-s390x-stg'] %}
# s390x staging builder uses a local varnish cache
topurl = http://kojipkgs-cache01.stg.s390.fedoraproject.org {{koji_topurl}}
{% elif koji_topurl == 'https://kojipkgs.fedoraproject.org/' %}
; add some additional urls for failover
topurl = {{koji_topurl}} https://kojipkgs01.fedoraproject.org https://kojipkgs02.fedoraproject.org
{% else %}
;url of package download site
topurl = {{koji_topurl}}

{% endif %}
; The directory root for temporary storage
; workdir=/tmp/koji

; The directory root for mock
; mockdir=/var/lib/mock

; The user to run as when doing builds
; mockuser=kojibuilder

; The vendor to use in rpm headers
vendor=Fedora Project

; The packager to use in rpm headers
packager=Fedora Project

; the distribution to use in rpm headers
distribution=Fedora Project

; The _host string to use in mock
mockhost=redhat-linux-gnu

; The URL for the xmlrpc server
server={{koji_server_url}}

{% if env == 'staging' %}
; The URL for the packages tree
pkgurl=http://kojipkgs.stg.fedoraproject.org/packages
{% endif %}

{% if env == 'staging' %}
; A whitespace-separated list of hostname:repository pairs that kojid is authorized to checkout from (no quotes)
allowed_scms=
    !src.stg.fedoraproject.org:/pagure/fork/*
    !src.stg.fedoraproject.org:/pagure/forks/*
    !pkgs.stg.fedoraproject.org:/pagure/fork/*
    !pkgs.stg.fedoraproject.org:/pagure/forks/*
    !src.stg.fedoraproject.org:/fork/*
    !src.stg.fedoraproject.org:/forks/*
    !src.stg.fedoraproject.org:/cgit/*
    src.stg.fedoraproject.org:/container/*:false
    src.stg.fedoraproject.org:/git/rpms/*:false:fedpkg,sources
    !src.stg.fedoraproject.org:/git/*
    !pkgs.stg.fedoraproject.org:/fork/*
    !pkgs.stg.fedoraproject.org:/forks/*
    !pkgs.stg.fedoraproject.org:/cgit/*
    !pkgs.stg.fedoraproject.org:/git/*
    pkgs.stg.fedoraproject.org:/container/*:false
    pkgs.stg.fedoraproject.org:/rpms/*:false:fedpkg,sources
    pkgs.stg.fedoraproject.org:/*:false:fedpkg,sources
    src.stg.fedoraproject.org:/*:false:fedpkg,sources
    pkgs.fedoraproject.org:/rpms/*:false:fedpkg,sources
    pkgs.fedoraproject.org:/*:false:fedpkg,sources
    pagure.io:/fedora-kickstarts.git:false
    src.fedoraproject.org:/*:false:fedpkg,sources
{% else %}
; A whitespace-separated list of hostname:repository pairs that kojid is authorized to checkout from (no quotes)
allowed_scms=
    !src.fedoraproject.org:/pagure/fork/*
    !src.fedoraproject.org:/pagure/forks/*
    !pkgs.fedoraproject.org:/pagure/fork/*
    !pkgs.fedoraproject.org:/pagure/forks/*
    !src.fedoraproject.org:/fork/*
    !src.fedoraproject.org:/forks/*
    !src.fedoraproject.org:/cgit/*
    !src.fedoraproject.org:/git/*
    !pkgs.fedoraproject.org:/fork/*
    !pkgs.fedoraproject.org:/forks/*
    !pkgs.fedoraproject.org:/cgit/*
    !pkgs.fedoraproject.org:/git/*
    pkgs.fedoraproject.org:/*:false:fedpkg,sources
    pagure.io:/fedora-kickstarts.git:false
    src.fedoraproject.org:/*:false:fedpkg,sources
    pagure.io:/fork/*/fedora-kickstarts.git:false
{% endif %}

; allow tasks to continue to completion if a sibling fails
; the parent task will fail but all child tasks will complete
build_arch_can_fail = true

; The mail host to use for sending email notifications
smtphost=bastion.phx2.fedoraproject.org

; The From address used when sending email notifications
from_addr=Fedora Koji Build System <buildsys@fedoraproject.org>

;configuration for SSL athentication
serverca = /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem

; Kerberos configuration
krb_principal = compile/{{ inventory_hostname }}@{{ ipa_realm }}
keytab = /etc/kojid/kojid.keytab
krbservice = host
krb_rdns = false

{% if 'runroot' in group_names %}
; Config for it lives in /etc/kojid/runroot.conf
plugins = runroot

{% else %}

{% if ansible_architecture == 'x86_64' and not inventory_hostname.startswith('bkernel') %}
plugins = builder_containerbuild
{% else %}
plugins =
{% endif %}

{% endif %}
