Added a parameter and default value for the groups parameter; added it to the service object ERB template.

This commit is contained in:
Nick Chappell 2014-07-28 19:24:39 -07:00
parent a66de2fe38
commit 90d22283aa
2 changed files with 5 additions and 3 deletions

View file

@ -13,9 +13,9 @@ define icinga2::object::service (
$object_servicename = $name, $object_servicename = $name,
$template_to_import = 'generic-service', $template_to_import = 'generic-service',
$display_name = $name, $display_name = $name,
$host_name = $fqdn, $host_name = $fqdn,
$groups = [],
#Parameters to add: #Parameters to add:
# * groups
# * vars # * vars
# * check_command # * check_command
# * max_check_attempts # * max_check_attempts

View file

@ -11,7 +11,6 @@
*/ */
// Parameters to add: // Parameters to add:
// * groups
// * vars // * vars
// * check_command // * check_command
// * max_check_attempts // * max_check_attempts
@ -45,4 +44,7 @@ object Service "<%= @object_servicename %>" {
<%- if @host_name -%> <%- if @host_name -%>
host_name = "<%= @host_name -%>" host_name = "<%= @host_name -%>"
<%- end -%> <%- end -%>
<%- if @groups.length != 0 -%>
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
<%- end -%>
} }