Defined Type: nrpe::plugin
- Defined in:
- modules/nrpe/manifests/plugin.pp
Summary
Installs a local NRPE pluginOverview
SPDX-License-Identifier: Apache-2.0
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'modules/nrpe/manifests/plugin.pp', line 6
define nrpe::plugin (
Optional[Stdlib::Filesource] $source = undef,
Optional[String] $content = undef,
Wmflib::Ensure $ensure = present,
) {
if $ensure == 'present' and $source == undef and $content == undef {
fail('Either source or content attribute needs to be given')
}
if $source != undef and $content != undef {
fail('Both source and content attribute have been defined')
}
@file { "/usr/local/lib/nagios/plugins/${title}":
ensure => stdlib::ensure($ensure, 'file'),
source => $source,
content => $content,
owner => 'root',
group => 'root',
mode => '0555',
tag => 'nrpe::plugin',
}
}
|