Skip to content

Commit

Permalink
plugin::filecount::directory - data type changes
Browse files Browse the repository at this point in the history
- Add more data types
- $path a required parameter, not optional
- Also be explict with $collectd::plugin_conf_dir reference
  • Loading branch information
juniorsysadmin committed Nov 12, 2017
1 parent d06acc6 commit bdf16fe
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions manifests/plugin/filecount/directory.pp
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit bdf16fe

Please sign in to comment.