From 3dad9ff3274cbd0d6f98ce02186ee9b952f3fcba Mon Sep 17 00:00:00 2001 From: Bruno Goncalves Date: Feb 23 2018 13:01:01 +0000 Subject: fixed issue99 --- diff --git a/roles/standard-test-beakerlib/tasks/main.yml b/roles/standard-test-beakerlib/tasks/main.yml index e803582..add8c57 100644 --- a/roles/standard-test-beakerlib/tasks/main.yml +++ b/roles/standard-test-beakerlib/tasks/main.yml @@ -3,8 +3,10 @@ - delegate_to: "{{ test_runner_inventory_name }}" block: - name: Add restraint repo for restraint-rhts using DNF - shell: dnf copr enable -y bpeck/restraint - ignore_errors: True + block: + - package: dnf-plugins-core state=present + - shell: dnf copr enable -y bpeck/restraint + ignore_errors: True when: "hostvars[test_runner_inventory_name]['is_dnf_os'] | bool" - name: Add restraint repo for restraint-rhts using YUM diff --git a/roles/str-common/tasks/pkgs-dnf.yml b/roles/str-common/tasks/pkgs-dnf.yml index 554a817..bcf7c0b 100644 --- a/roles/str-common/tasks/pkgs-dnf.yml +++ b/roles/str-common/tasks/pkgs-dnf.yml @@ -2,7 +2,7 @@ # Note, this method cannot install -debuginfo packages. package: name={{item}} state=present with_items: - - "{{ pkgs_ordinary_req }}" + - "{{ pkgs_ordinary_req|d|list }}" - name: Install the common requirements on target package: name={{item}} state=present @@ -20,6 +20,13 @@ shell: | debuginfo-install --assumeyes {{item}} with_items: - - "{{ pkgs_debuginfo_req }}" - when: - - pkgs_debuginfo_req + - "{{ pkgs_debuginfo_req|d|list }}" + +- block: + - package: name=dnf-plugins-core state=present + - shell: dnf copr enable -y {{item}} + with_items: + - "{{copr_repos}}" + name: Enable copr repos using DNF + ignore_errors: True + when: copr_repos is defined diff --git a/roles/str-common/tasks/pkgs-yum.yml b/roles/str-common/tasks/pkgs-yum.yml index a23042e..b61f6c5 100644 --- a/roles/str-common/tasks/pkgs-yum.yml +++ b/roles/str-common/tasks/pkgs-yum.yml @@ -2,7 +2,7 @@ # Note, this method cannot install -debuginfo packages. package: name={{item}} state=present with_items: - - "{{ pkgs_ordinary_req }}" + - "{{ pkgs_ordinary_req|d|list }}" - name: Install the common requirements on target package: name={{item}} state=present @@ -18,6 +18,13 @@ shell: | debuginfo-install --assumeyes {{item}} with_items: - - "{{ pkgs_debuginfo_req }}" - when: - - pkgs_debuginfo_req + - "{{ pkgs_debuginfo_req|d|list }}" + +- block: + - package: name=yum-plugin-copr state=present + - shell: yum copr -y {{item}} + with_items: + - "{{copr_repos}}" + name: Enable copr repos using YUM + ignore_errors: True + when: copr_repos is defined