Skip to content

Commit

Permalink
Fixed duplicate declaration of package
Browse files Browse the repository at this point in the history
  • Loading branch information
Begum Tuncer committed Jun 2, 2015
1 parent 2a1d8de commit 963fc0c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 5 additions & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}
}

9 changes: 5 additions & 4 deletions manifests/sentinel.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 963fc0c

Please sign in to comment.