From 963fc0cc3769c5ccbb7e1043699be1425f5e5b2f Mon Sep 17 00:00:00 2001 From: Begum Tuncer Date: Tue, 2 Jun 2015 18:54:17 +0300 Subject: [PATCH] Fixed duplicate declaration of package --- manifests/install.pp | 8 +++++--- manifests/sentinel.pp | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/manifests/install.pp b/manifests/install.pp index bfa7d0746..22c4abee5 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -3,8 +3,10 @@ # This class installs the application. # class redis::install { - ensure_resource('package', $::redis::package_name, { - 'ensure' => $::redis::package_ensure - }) + unless defined(Package["$::redis::package_name"]) { + ensure_resource('package', $::redis::package_name, { + 'ensure' => $::redis::package_ensure + }) + } } diff --git a/manifests/sentinel.pp b/manifests/sentinel.pp index 6bb9243aa..24d4ff138 100644 --- a/manifests/sentinel.pp +++ b/manifests/sentinel.pp @@ -170,10 +170,11 @@ $notification_script = $::redis::params::sentinel_notification_script, ) inherits redis::params { - - ensure_resource('package', $package_name, { - 'ensure' => $package_ensure - }) + unless defined(Package["$package_name"]) { + ensure_resource('package', $package_name, { + 'ensure' => $package_ensure + }) + } file { $config_file_orig: