From 69765e6f638bd634f723513318e43dc2913acc89 Mon Sep 17 00:00:00 2001 From: juniorsysadmin Date: Sun, 8 Apr 2018 12:57:10 +1000 Subject: [PATCH] collectd::plugin::apache - Use data types - $manage_package must now be a Boolean and defaults to the value of $collectd::manage_package --- manifests/plugin/apache.pp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/manifests/plugin/apache.pp b/manifests/plugin/apache.pp index 98213b52f..c57696f55 100644 --- a/manifests/plugin/apache.pp +++ b/manifests/plugin/apache.pp @@ -1,18 +1,16 @@ # https://collectd.org/wiki/index.php/Plugin:Apache class collectd::plugin::apache ( - $ensure = 'present', - $manage_package = undef, + Enum['present', 'absent'] $ensure = 'present', + Boolean $manage_package = $collectd::manage_package, Hash $instances = { 'localhost' => { 'url' => 'http://localhost/mod_status?auto' } }, - $interval = undef, + Optional[Integer[1]] $interval = undef, Optional[Array] $package_install_options = $collectd::package_install_options, ) { include ::collectd - $_manage_package = pick($manage_package, $::collectd::manage_package) - if $facts['os']['family'] == 'RedHat' { - if $_manage_package { + if $manage_package { package { 'collectd-apache': ensure => $ensure, install_options => $package_install_options,