From a818ccb3cf627e4d63e13f155ec83f406ad58915 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 10 Jun 2022 08:21:16 +0200 Subject: [PATCH] copr-frontend: automatically apply the chroot comment changes --- roles/copr/frontend/files/chroots.conf | 4 +++- roles/copr/frontend/tasks/main.yml | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/roles/copr/frontend/files/chroots.conf b/roles/copr/frontend/files/chroots.conf index 9c8e0882c2..b12a0cd8db 100644 --- a/roles/copr/frontend/files/chroots.conf +++ b/roles/copr/frontend/files/chroots.conf @@ -1,7 +1,9 @@ # vim: ft=python +config = {} + config["rules"] = [{ - "match": ["fedora-34-i386", "fedora-35-i386", "fedora-36-i386"], + "match": ["fedora-rawhide-i386", "fedora-34-i386", "fedora-35-i386", "fedora-36-i386"], "comment": "Non-released Koji packages, more info why you probably don't want this one." }, { "match": ["epel-8", "epel-9"], diff --git a/roles/copr/frontend/tasks/main.yml b/roles/copr/frontend/tasks/main.yml index 9360549d79..871981b571 100644 --- a/roles/copr/frontend/tasks/main.yml +++ b/roles/copr/frontend/tasks/main.yml @@ -86,8 +86,21 @@ - name: install config for 'copr-frontend chroots-template' copy: src="chroots.conf" dest=/etc/copr/chroots.conf mode=600 owner=copr-fe group=copr-fe + register: chroots_conf_installed tags: - config + - chroots_config + +- name: apply the config comments + command: copr-frontend chroots-template + become: yes + become_user: copr-fe + args: + chdir: /usr/share/copr/coprs_frontend/ + when: chroots_conf_installed.changed + tags: + - config + - chroots_config - name: enable and start redis # TODO: .service in copr-backend should depend on redis service: name=redis enabled=yes state=started