From 70d98cce712daad9087d955dcfeb2b1d2e3f3b6e Mon Sep 17 00:00:00 2001 From: Kamil Páral Date: Mar 21 2018 14:04:44 +0000 Subject: allow to specify COPR repos in minion_repos By using the copr notation instead of a standard repo file URL, this now works also on Rawhide minions (which were broken before, because the repo files used $releasever and Rawhide minions need 'rawhide' instead of 'NN' in the repo path). See also: https://pagure.io/releng/issue/7398 See also: https://pagure.io/copr/copr/issue/267 --- diff --git a/conf/taskotron.yaml.example b/conf/taskotron.yaml.example index 7adaa1d..76ab182 100644 --- a/conf/taskotron.yaml.example +++ b/conf/taskotron.yaml.example @@ -148,10 +148,13 @@ ## Number of retries when disposable client fails to boot within timeout #spawn_vm_retries: 3 -## Additional repos for minion to install packages from +## Additional DNF repos to set up on the minion. +## You can use a special syntax 'copr:reponame' to enable Fedora COPR repo on +## minion by running 'dnf copr enable reponame' on it. #minion_repos: # - https://server1/repo/ # - https://server2/file.repo +# - copr:user/myrepo ## ==== LOGGING section ==== diff --git a/data/ansible/runner.yml b/data/ansible/runner.yml index 71733d3..43e1bb4 100644 --- a/data/ansible/runner.yml +++ b/data/ansible/runner.yml @@ -36,7 +36,7 @@ state: present with_items: - ansible - - dnf-plugins-core # provides 'dnf config-manager' + - dnf-plugins-core # provides 'dnf config-manager' and 'dnf copr' - libselinux-python - standard-test-roles - python2-dnf @@ -76,11 +76,17 @@ when: keepalive_minutes|int > 0 delegate_to: localhost - - name: Configure extra DNF repositories (minion_repos) + - name: Set up extra DNF repositories (minion_repos) shell: > dnf config-manager --add-repo {{ item }} with_items: '{{ minion_repos }}' - when: not local + when: not local and not item.startswith('copr') + + - name: Set up extra DNF COPR repositories (minion_repos) + shell: > + dnf -y copr enable {{ item.replace('copr:','',1) }} + with_items: '{{ minion_repos }}' + when: not local and item.startswith('copr') - name: Start heartbeat command: >