[icinga-checkins] icinga.org: puppet-icinga2/master: * fixed typos and mistakes. thanks nickchappell.

git at icinga.org git at icinga.org
Sun Nov 2 05:40:25 CET 2014


Module: puppet-icinga2
Branch: master
Commit: 537735a4863d76e8b26b71775846540f8cb19ec3
URL:    https://git.icinga.org/?p=puppet-icinga2.git;a=commit;h=537735a4863d76e8b26b71775846540f8cb19ec3

Author: Ricardo Melo <ricardo.melo at gameloft.com>
Date:   Wed Oct 22 16:50:21 2014 -0400

* fixed typos and mistakes. thanks nickchappell.

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

Merged in from: https://github.com/Icinga/puppet-icinga2/pull/32

refs#7228: https://dev.icinga.org/issues/7228

---

 manifests/object/notificationcommand.pp       |   11 +++++++----
 templates/object_notificationcommand.conf.erb |    4 ++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/manifests/object/notificationcommand.pp b/manifests/object/notificationcommand.pp
index 833b00c..d9cbe17 100644
--- a/manifests/object/notificationcommand.pp
+++ b/manifests/object/notificationcommand.pp
@@ -11,15 +11,15 @@
 
 define icinga2::object::notificationcommand (
   $object_notificationcommandname = $name,
-  $template_to_import = 'plugin-check-command',
+  $template_to_import = 'plugin-notification-command',
 /*  $methods           = undef, */ /* Need to get more details about this attribute */
   $command           = undef,
   $cmd_path          = 'PluginDir',
-  $arguments         = {},
+  $arguments         = undef,
   $env               = undef,
-  $vars              = {},
+  $vars              = undef,
   $timeout           = undef,
-  $target_dir        = '/etc/icinga2/conf.d',
+  $target_dir        = '/etc/icinga2/objects/notificationcommands',
   $target_file_name  = "${name}.conf",
   $target_file_owner = 'root',
   $target_file_group = 'root',
@@ -31,6 +31,9 @@ define icinga2::object::notificationcommand (
   validate_string($template_to_import)
   validate_array($command)
   validate_string($cmd_path)
+  if $arguments {
+    validate_hash($arguments)
+  }
   if $env {
     validate_hash($env)
   }
diff --git a/templates/object_notificationcommand.conf.erb b/templates/object_notificationcommand.conf.erb
index 4e0f009..cb1384b 100644
--- a/templates/object_notificationcommand.conf.erb
+++ b/templates/object_notificationcommand.conf.erb
@@ -1,5 +1,5 @@
 /**
-* WARNING: This CheckCommand definition is automatically generated by Puppet.
+* WARNING: This NotificationCommand definition is automatically generated by Puppet.
 * ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
 */
 
@@ -54,7 +54,7 @@ object NotificationCommand "<%= @object_notificationcommandname %>" {
 
   <%- if @env -%>
   env = {
-  <%- @vars.each_pair do |key,value| -%>
+  <%- @env.each_pair do |key,value| -%>
     <%= key %> = <%= value %>
   <%- end -%>
   }



More information about the icinga-checkins mailing list