Defined Type: sensu::contact
- Defined in:
- manifests/contact.pp
Summary
Manages contact routingOverview
Manage Contact Routing configuration with Sensu Enterprise.
Note: If the sensu::purge_config
class parameter is true
, unmanaged
sensu::contact resources located in /etc/sensu/conf.d/contacts will be purged.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'manifests/contact.pp', line 19
define sensu::contact(
Enum['present','absent'] $ensure = 'present',
Optional[String] $base_path = undef,
Hash $config = {},
) {
include ::sensu
$file_ensure = $ensure ? {
'absent' => 'absent',
default => 'file'
}
# handler configuration may contain "secrets"
file { "${::sensu::conf_dir}/contacts/${name}.json":
ensure => $file_ensure,
owner => $::sensu::user,
group => $::sensu::group,
mode => $::sensu::config_file_mode,
before => Sensu_contact[$name],
}
sensu_contact { $name:
ensure => $ensure,
config => $config,
base_path => $base_path,
require => File["${::sensu::conf_dir}/contacts/${name}.json"],
}
}
|