From d0ef82673f5b69d004da840e04e76a5d3cf5c469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kalu=C5=BEa?= Date: Thu, 18 Jan 2018 07:03:01 +0000 Subject: [PATCH] Add ODCS raw_config_wrapper and runroot_koji configs as ansible templates --- roles/odcs/base/tasks/main.yml | 28 +++++++++++++++++++ .../etc/odcs/raw_config_wrapper.conf.j2 | 14 ++++++++++ .../templates/etc/odcs/runroot_koji.conf.j2 | 20 +++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 roles/odcs/base/templates/etc/odcs/raw_config_wrapper.conf.j2 create mode 100644 roles/odcs/base/templates/etc/odcs/runroot_koji.conf.j2 diff --git a/roles/odcs/base/tasks/main.yml b/roles/odcs/base/tasks/main.yml index cba1499399..8d02d9ea79 100644 --- a/roles/odcs/base/tasks/main.yml +++ b/roles/odcs/base/tasks/main.yml @@ -82,6 +82,34 @@ - odcs - odcs/backend +- name: generate the ODCS raw_config_wrapper config for backend + template: + src: etc/odcs/raw_config_wrapper.conf.j2 + dest: /etc/odcs/raw_config_wrapper.conf + owner: odcs + group: odcs + mode: 0440 + notify: + - restart odcs-backend + when: inventory_hostname.startswith('odcs-backend') + tags: + - odcs + - odcs/backend + +- name: generate the ODCS runroot_koji config for backend + template: + src: etc/odcs/runroot_koji.conf.j2 + dest: /etc/odcs/runroot_koji.conf + owner: odcs + group: odcs + mode: 0440 + notify: + - restart odcs-backend + when: inventory_hostname.startswith('odcs-backend') + tags: + - odcs + - odcs/backend + - name: copy the ODCS pungi config template to backend copy: src="{{ roles_path }}/odcs/base/files/pungi.conf" dest=/etc/odcs/pungi.conf owner=odcs group=odcs mode=0640 diff --git a/roles/odcs/base/templates/etc/odcs/raw_config_wrapper.conf.j2 b/roles/odcs/base/templates/etc/odcs/raw_config_wrapper.conf.j2 new file mode 100644 index 0000000000..4055203363 --- /dev/null +++ b/roles/odcs/base/templates/etc/odcs/raw_config_wrapper.conf.j2 @@ -0,0 +1,14 @@ +from raw_config import * +{% if env == 'staging' %} +koji_profile = 'odcs_stg' +{% else %} +koji_profile = 'odcs_production' +% endif %} + +# We do not have any old compose when generating ODCS compose, so do not +# request using deltas. +createrepo_deltas = False + +# In runroot, we cannot use guestmount, but have to use mount -o loop. +buildinstall_use_guestmount=False + diff --git a/roles/odcs/base/templates/etc/odcs/runroot_koji.conf.j2 b/roles/odcs/base/templates/etc/odcs/runroot_koji.conf.j2 new file mode 100644 index 0000000000..36f7f95d7e --- /dev/null +++ b/roles/odcs/base/templates/etc/odcs/runroot_koji.conf.j2 @@ -0,0 +1,20 @@ +[odcs_stg] +server = https://koji.stg.fedoraproject.org/kojihub +weburl = https://koji.stg.fedoraproject.org/koji +topurl = https://kojipkgs.fedoraproject.org/ +anon_retry = true +krb_rdns = false +authtype = kerberos +principal = innercompose/odcs.stg.fedoraproject.org@STG.FEDORAPROJECT.ORG +keytab = /etc/kojid/secrets/odcs_inner.keytab + +[odcs_production] +server = https://koji.fedoraproject.org/kojihub +weburl = https://koji.fedoraproject.org/koji +topurl = https://kojipkgs.fedoraproject.org/ +anon_retry = true +krb_rdns = false +authtype = kerberos +principal = innercompose/odcs.fedoraproject.org@FEDORAPROJECT.ORG +keytab = /etc/kojid/secrets/odcs_inner.keytab +