Added a parameter and default value for the groups parameter; added it to the service object ERB template.
This commit is contained in:
parent
a66de2fe38
commit
90d22283aa
2 changed files with 5 additions and 3 deletions
|
@ -13,9 +13,9 @@ define icinga2::object::service (
|
|||
$object_servicename = $name,
|
||||
$template_to_import = 'generic-service',
|
||||
$display_name = $name,
|
||||
$host_name = $fqdn,
|
||||
$host_name = $fqdn,
|
||||
$groups = [],
|
||||
#Parameters to add:
|
||||
# * groups
|
||||
# * vars
|
||||
# * check_command
|
||||
# * max_check_attempts
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
// Parameters to add:
|
||||
// * groups
|
||||
// * vars
|
||||
// * check_command
|
||||
// * max_check_attempts
|
||||
|
@ -45,4 +44,7 @@ object Service "<%= @object_servicename %>" {
|
|||
<%- if @host_name -%>
|
||||
host_name = "<%= @host_name -%>"
|
||||
<%- end -%>
|
||||
<%- if @groups.length != 0 -%>
|
||||
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
|
||||
<%- end -%>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue