From bdf16fe3f36f1f4296ef267b0aa3d5316eda17db Mon Sep 17 00:00:00 2001 From: juniorsysadmin Date: Sun, 12 Nov 2017 13:19:43 +1100 Subject: [PATCH] plugin::filecount::directory - data type changes - Add more data types - $path a required parameter, not optional - Also be explict with $collectd::plugin_conf_dir reference --- manifests/plugin/filecount/directory.pp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/manifests/plugin/filecount/directory.pp b/manifests/plugin/filecount/directory.pp index 4a334ae5e..1faade5bc 100644 --- a/manifests/plugin/filecount/directory.pp +++ b/manifests/plugin/filecount/directory.pp @@ -1,21 +1,19 @@ # https://collectd.org/wiki/index.php/Plugin:FileCount define collectd::plugin::filecount::directory ( - $ensure = 'present', - $instance = $name, - Stdlib::Absolutepath $path = undef, - $pattern = undef, - $mtime = undef, - $size = undef, - $recursive = undef, - $includehidden = undef + Stdlib::Absolutepath $path, + Enum['present', 'absent'] $ensure = 'present', + String $instance = $name, + Optional[String] $pattern = undef, + Optional[String] $mtime = undef, + Optional[String] $size = undef, + Optional[Boolean] $recursive = undef, + Optional[Boolean] $includehidden = undef, ) { include ::collectd include ::collectd::plugin::filecount - $conf_dir = $collectd::plugin_conf_dir - - file { "${conf_dir}/15-filecount-${name}.conf": + file { "${collectd::plugin_conf_dir}/15-filecount-${name}.conf": ensure => $ensure, mode => '0640', owner => 'root',