Skip to content

Commit

Permalink
Changes package installation
Browse files Browse the repository at this point in the history
* Right now package is checked with a defined function
* If user doesn’t want to manage the package or is managing somewhere else, they should use the parameter not to manage it
  • Loading branch information
petems committed Oct 14, 2016
1 parent 9425766 commit 585f00c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
# This class installs the application.
#
class redis::install {
unless defined(Package['$::redis::package_name']) {
ensure_resource('package', $::redis::package_name, {
'ensure' => $::redis::package_ensure
})

if $::redis::manage_package {
package { $::redis::package_name:
ensure => $::redis::package_ensure,
}
}
}

1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
class redis::params {
# Generic
$manage_repo = false
$manage_package = true

# redis.conf.erb
$activerehashing = true
Expand Down

0 comments on commit 585f00c

Please sign in to comment.