adding ability to call a static checkcommand template
Signed-off-by: Nick Chappell <nick@intronic.org> Merged from: https://github.com/Icinga/puppet-icinga2/pull/35 refs#7628: https://dev.icinga.org/issues/7628
This commit is contained in:
parent
6e5dd00438
commit
46298909ed
1 changed files with 16 additions and 14 deletions
|
@ -11,19 +11,21 @@
|
||||||
|
|
||||||
define icinga2::object::checkcommand (
|
define icinga2::object::checkcommand (
|
||||||
$object_checkcommandname = $name,
|
$object_checkcommandname = $name,
|
||||||
$template_to_import = 'plugin-check-command',
|
$template_to_import = 'plugin-check-command',
|
||||||
/* $methods = undef, */ /* Need to get more details about this attribute */
|
/* $methods = undef, */ /* Need to get more details about this attribute */
|
||||||
$command = undef,
|
$command = undef,
|
||||||
$cmd_path = 'PluginDir',
|
$cmd_path = 'PluginDir',
|
||||||
$arguments = {},
|
$arguments = {},
|
||||||
$env = undef,
|
$env = undef,
|
||||||
$vars = {},
|
$vars = {},
|
||||||
$timeout = undef,
|
$timeout = undef,
|
||||||
$target_dir = '/etc/icinga2/objects/checkcommands',
|
$target_dir = '/etc/icinga2/objects/checkcommands',
|
||||||
$target_file_name = "${name}.conf",
|
$checkcommand_template_module = 'icinga2',
|
||||||
$target_file_owner = 'root',
|
$checkcommand_template = 'object_checkcommand.conf.erb',
|
||||||
$target_file_group = 'root',
|
$target_file_name = "${name}.conf",
|
||||||
$target_file_mode = '0644'
|
$target_file_owner = 'root',
|
||||||
|
$target_file_group = 'root',
|
||||||
|
$target_file_mode = '0644'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
#Do some validation of the class' parameters:
|
#Do some validation of the class' parameters:
|
||||||
|
@ -50,7 +52,7 @@ define icinga2::object::checkcommand (
|
||||||
owner => $target_file_owner,
|
owner => $target_file_owner,
|
||||||
group => $target_file_group,
|
group => $target_file_group,
|
||||||
mode => $target_file_mode,
|
mode => $target_file_mode,
|
||||||
content => template('icinga2/object_checkcommand.conf.erb'),
|
content => template("${checkcommand_template_module}/${checkcommand_template}"),
|
||||||
notify => Service['icinga2'],
|
notify => Service['icinga2'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue