diff --git a/roles/openqa/server/tasks/main.yml b/roles/openqa/server/tasks/main.yml index b5304d6c3d..25f3735249 100644 --- a/roles/openqa/server/tasks/main.yml +++ b/roles/openqa/server/tasks/main.yml @@ -109,9 +109,9 @@ file: path=/var/tmp/scratchrepo state=directory owner=root group=root when: "openqa_scratch is defined" -- name: Install Koji CLI client +- name: Install Koji CLI client and createrepo package: - name: koji + name: ["koji", "createrepo"] state: present tags: - packages @@ -124,6 +124,12 @@ loop: "{{ openqa_scratch|flatten(levels=1) }}" when: "openqa_scratch is defined" +- name: Write repodata + command: "createrepo ." + args: + chdir: /var/tmp/scratchrepo + when: "openqa_scratch is defined" + - name: Write scratch build repo config copy: src=scratchrepo.conf dest=/etc/yum.repos.d/scratchrepo.conf owner=root group=root mode=0644 when: "openqa_scratch is defined" diff --git a/roles/openqa/worker/tasks/main.yml b/roles/openqa/worker/tasks/main.yml index 8a53909560..179dcc5743 100644 --- a/roles/openqa/worker/tasks/main.yml +++ b/roles/openqa/worker/tasks/main.yml @@ -36,9 +36,9 @@ file: path=/var/tmp/scratchrepo state=directory owner=root group=root when: "openqa_scratch is defined" -- name: Install Koji CLI client +- name: Install Koji CLI client and createrepo package: - name: koji + name: ["koji", "createrepo"] state: present tags: - packages @@ -51,6 +51,12 @@ loop: "{{ openqa_scratch|flatten(levels=1) }}" when: "openqa_scratch is defined" +- name: Write repodata + command: "createrepo ." + args: + chdir: /var/tmp/scratchrepo + when: "openqa_scratch is defined" + - name: Write scratch build repo config copy: src=scratchrepo.conf dest=/etc/yum.repos.d/scratchrepo.conf owner=root group=root mode=0644 when: "openqa_scratch is defined"