Defined Type: sensu::plugins_dir

Defined in:
manifests/plugins_dir.pp

Summary

Verifies if install_dir exists without duplicate declarations

Overview

This define verifies if install_dir exists without duplicate declarations

Parameters:

  • force (Boolean)

    Value of the parameter force of file resource for the managed directory.

  • purge (Boolean)

    Value of the parameter purge of file resource for the managed directory.

  • recurse (Boolean)

    Value of the parameter recurse of file resource for the managed directory.

  • path (String) (defaults to: $name)

    Path of the directory to create. If not defined the $title is used



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'manifests/plugins_dir.pp', line 13

define sensu::plugins_dir (
  Boolean $force,
  Boolean $purge,
  Boolean $recurse,
  String $path = $name,
) {
  if ! defined(File[$path]) {
    file { $path:
      ensure  => directory,
      mode    => '0555',
      owner   => 'sensu',
      group   => 'sensu',
      recurse => $recurse,
      purge   => $purge,
      force   => $force,
      require => Package[$sensu::package::pkg_title],
    }
  }
}