liddir -> libdir

Signed-off-by: Nick Chappell <nick@intronic.org>

Fixes a typo by changing instances of 'liddir' to 'libdir'.

Originally from https://github.com/Icinga/puppet-icinga2/pull/6

refs #7189, https://dev.icinga.org/issues/7189
This commit is contained in:
Thomas Weißschuh 2014-09-10 07:20:37 +00:00 committed by Nick Chappell
parent e6a0db39a7
commit 56618bee69
4 changed files with 13 additions and 13 deletions

View file

@ -4,21 +4,21 @@
#
# Parameters:
# * $command_name = What NRPE will know the command as; this defaults to the title of the resource
# * $nrpe_plugin_liddir = The directory where the NRPE plugins themselves live
# * $nrpe_plugin_libdir = The directory where the NRPE plugins themselves live
# * $nrpe_plugin_name = The name of the plugin the command will run
# * $nrpe_plugin_args = The arguments to pass to the plugin. This may be optional,
# depending on the plugin and whether it expects any arguments or parameters
define icinga2::nrpe::command (
$command_name = $name,
$nrpe_plugin_liddir = $icinga2::params::nrpe_plugin_liddir,
$nrpe_plugin_libdir = $icinga2::params::nrpe_plugin_libdir,
$nrpe_plugin_name = undef,
$nrpe_plugin_args = undef,
) {
#Do some validation of the class' parameters:
validate_string($command_name)
validate_string($nrpe_plugin_liddir)
validate_string($nrpe_plugin_libdir)
validate_string($nrpe_plugin_name)
validate_string($nrpe_plugin_args)
@ -31,4 +31,4 @@ define icinga2::nrpe::command (
notify => Service[$icinga2::params::nrpe_daemon_name]
}
}
}

View file

@ -7,7 +7,7 @@
# filenameon the client machine in the file resource. By default, it's
# taken from the resource's name
#
# * $nrpe_plugin_liddir = The directory where the NRPE plugins themselves live
# * $nrpe_plugin_libdir = The directory where the NRPE plugins themselves live
#
# * $source_file = The file that will get distributed to Icinga client machines. This can
# be anywhere on your Puppet master. See http://docs.puppetlabs.com/references/3.stable/type.html#file-attribute-source
@ -16,15 +16,15 @@
define icinga2::nrpe::plugin (
$plugin_name = $name,
$nrpe_plugin_liddir = $icinga2::params::nrpe_plugin_liddir,
$nrpe_plugin_libdir = $icinga2::params::nrpe_plugin_libdir,
$source_file = undef,
) {
#Do some validation of the class' parameters:
validate_string($name)
validate_string($nrpe_plugin_liddir)
validate_string($nrpe_plugin_libdir)
file { "${nrpe_plugin_liddir}/${plugin_name}":
file { "${nrpe_plugin_libdir}/${plugin_name}":
owner => 'root',
group => 'root',
mode => '755',
@ -34,4 +34,4 @@ define icinga2::nrpe::plugin (
}
}
}

View file

@ -268,7 +268,7 @@ class icinga2::params {
#File and template variable names for Red Had/CentOS systems:
'RedHat', 'CentOS': {
$nrpe_config_basedir = "/etc/nagios"
$nrpe_plugin_liddir = "/usr/lib64/nagios/plugins"
$nrpe_plugin_libdir = "/usr/lib64/nagios/plugins"
$nrpe_pid_file_path = "/var/run/nrpe/nrpe.pid"
$nrpe_user = "nrpe"
$nrpe_group = "nrpe"
@ -276,7 +276,7 @@ class icinga2::params {
#File and template variable names for Debian/Ubuntu systems:
/^(Debian|Ubuntu)$/: {
$nrpe_config_basedir = "/etc/nagios"
$nrpe_plugin_liddir = "/usr/lib/nagios/plugins"
$nrpe_plugin_libdir = "/usr/lib/nagios/plugins"
$nrpe_pid_file_path = "/var/run/nagios/nrpe.pid"
$nrpe_user = "nagios"
$nrpe_group = "nagios"
@ -329,4 +329,4 @@ class icinga2::params {
default: { fail("${operatingsystem} is not supported!") }
}
}
}

View file

@ -12,4 +12,4 @@
# **WILL** get overwritten! #
###########################################
command[<%= @command_name %>]=<%= @nrpe_plugin_liddir %>/<%= @nrpe_plugin_name %> <%= @nrpe_plugin_args %>
command[<%= @command_name %>]=<%= @nrpe_plugin_libdir %>/<%= @nrpe_plugin_name %> <%= @nrpe_plugin_args %>