[libvirt] [jenkins-ci PATCH 03/17] guests: Install EPEL on CentOS7

Fabiano Fidêncio posted 17 patches 6 years, 4 months ago
There is a newer version of this series
[libvirt] [jenkins-ci PATCH 03/17] guests: Install EPEL on CentOS7
Posted by Fabiano Fidêncio 6 years, 4 months ago
EPEL will be needed in order to have both "ninja" and "python36-*"
packages installed on CentOS7.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
---
 guests/playbooks/update/tasks/base.yml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/guests/playbooks/update/tasks/base.yml b/guests/playbooks/update/tasks/base.yml
index e0efe5d..15ffc07 100644
--- a/guests/playbooks/update/tasks/base.yml
+++ b/guests/playbooks/update/tasks/base.yml
@@ -9,6 +9,13 @@
     - os_name == 'Fedora'
     - os_version == 'Rawhide'
 
+- name: Enable EPEL
+  command: '{{ package_manager }} install epel-release -y'
+  args:
+    warn: no
+  when:
+    - os_name == 'CentOS'
+
 - name: Update installed packages
   package:
     name: '*'
-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH 03/17] guests: Install EPEL on CentOS7
Posted by Andrea Bolognani 6 years, 4 months ago
On Tue, 2019-10-01 at 16:28 +0200, Fabiano Fidêncio wrote:
> +- name: Enable EPEL
> +  command: '{{ package_manager }} install epel-release -y'
> +  args:
> +    warn: no
> +  when:
> +    - os_name == 'CentOS'
> +

At this point in the playbook the package module has been properly
bootstrapped (as evidenced by the fact that it's used immediately
afterwards), so we can do this like

  - name: Enable EPEL repository
    package:
      name: epel-release
      state: latest
    when:
      - os_name == 'CentOS'

With that changed,

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list