From f6717e14c6fb40343fe5097376084a7d3ecc6650 Mon Sep 17 00:00:00 2001 From: Felipe Salum Date: Fri, 18 Jul 2014 10:05:09 -0700 Subject: [PATCH] fixing $package_name is_string check #35 --- Modulefile | 2 -- lib/facter/redis_version.rb | 4 ++-- manifests/init.pp | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Modulefile b/Modulefile index dd4dfff..bbd1a48 100644 --- a/Modulefile +++ b/Modulefile @@ -11,5 +11,3 @@ project_page 'https://github.com/fsalum/puppet-redis' # https://forge.puppetlabs.com/thias/sysctl dependency 'thias/sysctl', '>= 0.3.0' -# https://forge.puppetlabs.com/puppetlabs/stdlib/ -dependency 'puppetlabs/stdlib', '>= 3.2.1' diff --git a/lib/facter/redis_version.rb b/lib/facter/redis_version.rb index 22b751b..289a1e5 100644 --- a/lib/facter/redis_version.rb +++ b/lib/facter/redis_version.rb @@ -1,6 +1,6 @@ require 'facter' -Facter.add("redis_version", :timeout => 20) do +Facter.add("redis_version", :timeout => 120) do confine :osfamily => "Debian" setcode do @@ -35,7 +35,7 @@ end end -Facter.add("redis_version", :timeout => 20) do +Facter.add("redis_version", :timeout => 120) do confine :osfamily => "RedHat" setcode do diff --git a/manifests/init.pp b/manifests/init.pp index d0f6a49..2466865 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -109,13 +109,13 @@ $conf_redis = $redis::params::conf $conf_logrotate = $redis::params::conf_logrotate - if is_string($package_name) { + $service = $redis::params::service + + if $package_name { $package = $package_name - } - else { + }else{ $package = $redis::params::package } - $service = $redis::params::service if $conf_pidfile { $conf_pidfile_real = $conf_pidfile