From 97c061e00a28bdee20741b7eaa11953b8bea067e Mon Sep 17 00:00:00 2001
From: Jonathan Lent <jlent@stanford.edu>
Date: Sat, 25 Jul 2015 12:12:30 -0700
Subject: [PATCH] rpm: removing package ensure on EL6

---
 NEWS             |  6 ++++++
 manifests/rpm.pp | 11 ++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/NEWS b/NEWS
index c47d365..0bcc7eb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+UNRELEASED
+
+    [rpm] Remove EL6 package requires of yum-plugin-downloadonly, since
+    yum-3.2.29-69 includes this plugin and obsoletes the individual
+    package (thus putting the puppet ensure in a loop) (jlent)
+
 release/004.051 (2015-07-24)
 
     [os] Small fix in base::os::debian to one of the systemd-related 
diff --git a/manifests/rpm.pp b/manifests/rpm.pp
index 74deffe..4f565e7 100644
--- a/manifests/rpm.pp
+++ b/manifests/rpm.pp
@@ -68,15 +68,12 @@ class base::rpm {
         }
         # RHEL5+
         default: {
-          # EL7 includes this plugin by default
-          if ($::lsbmajdistrelease != '7') {
-            $yumpackage = $::lsbmajdistrelease ? {
-              '5' => 'yum-downloadonly',
-              '6' => 'yum-plugin-downloadonly',
+          # EL6/7 includes this plugin by default 
+          if ($::lsbmajdistrelease == '5') {
+            package { 'yum-downloadonly': 
+              ensure => installed,
             }
-            package { $yumpackage: ensure => present; }
           }
-
           # RHEL systems need this plugin enabled, due to new licensing
           if ($::operatingsystem == 'RedHat') {
             # enable yum rhn plugin
-- 
GitLab