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 e81b1ed commit b5174b2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions manifests/init.pp
Expand Up @@ -175,6 +175,11 @@
#
# Default: false
#
# [*manage_package*]
# Enable/disable management of package
#
# Default: true
#
# [*masterauth*]
# If the master is password protected (using the "requirepass" configuration
# directive below) it is possible to tell the slave to authenticate before
Expand Down Expand Up @@ -547,6 +552,7 @@
$log_dir_mode = $::redis::params::log_dir_mode,
$log_file = $::redis::params::log_file,
$log_level = $::redis::params::log_level,
$manage_package = $::redis::params::manage_package,
$manage_repo = $::redis::params::manage_repo,
$masterauth = $::redis::params::masterauth,
$maxclients = $::redis::params::maxclients,
Expand Down
8 changes: 4 additions & 4 deletions manifests/install.pp
Expand Up @@ -3,10 +3,10 @@
# 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
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 b5174b2

Please sign in to comment.