From 7c4183e3360ee73ed12d0d7424370a0d2d30feba Mon Sep 17 00:00:00 2001 From: yatin Date: Mon, 25 Jun 2018 19:52:09 +0530 Subject: [PATCH] Use 'dnf' when configuring repo in Fedora Use 'dnf' instead of 'yum' in Fedora as Fedora no longer have 'yum' binary. Also Fedora do not need yum-plugin-priorities to manage repo priorities. Also Do not Enable rdo-qemu-ev repo for Fedora. Change-Id: Id33c970e810ea48d74b9095b0e505d4e71be005a --- manifests/repo/redhat/redhat.pp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/manifests/repo/redhat/redhat.pp b/manifests/repo/redhat/redhat.pp index a3b61f5..6fe406e 100644 --- a/manifests/repo/redhat/redhat.pp +++ b/manifests/repo/redhat/redhat.pp @@ -115,7 +115,7 @@ class openstack_extras::repo::redhat::redhat( create_resources('yumrepo', $rdo_hash, $_repo_defaults) } - if $manage_virt { + if $manage_virt and ($::operatingsystem != 'Fedora') { $virt_hash = { 'rdo-qemu-ev' => { 'baseurl' => "${centos_mirror_url}/centos/7/virt/\$basearch/kvm-common/", @@ -174,7 +174,7 @@ class openstack_extras::repo::redhat::redhat( resources { 'yumrepo': purge => true } } - if $manage_priorities { + if $manage_priorities and ($::operatingsystem != 'Fedora') { exec { 'installing_yum-plugin-priorities': command => '/usr/bin/yum install -y yum-plugin-priorities', logoutput => 'on_failure', @@ -189,9 +189,16 @@ class openstack_extras::repo::redhat::redhat( Yumrepo<||> -> Package<||> } - exec { 'yum_refresh': - command => '/usr/bin/yum clean all', - refreshonly => true, - } -> Package <||> + if ($::operatingsystem == 'Fedora') { + exec { 'yum_refresh': + command => '/usr/bin/dnf clean all', + refreshonly => true, + } -> Package <||> + } else { + exec { 'yum_refresh': + command => '/usr/bin/yum clean all', + refreshonly => true, + } -> Package <||> + } }