Use %> instead of -%> at the end of some ERB tags so that trailing whitespace isn't surpressed. Surpressing the trailing whitespace caused problems where there was one more parameters listed after each other. Each parameter would get squashed onto a single line, causing a syntax error when Icinga2 parsed the object file.
refs#7715: https://dev.icinga.org/issues/7715
This commit is contained in:
parent
299005edf4
commit
633e4faef9
11 changed files with 45 additions and 45 deletions
|
@ -25,10 +25,10 @@ apply Dependency "<%= @object_name %>" to "<%= @object_type %>"{
|
|||
child_service_name = "<%= @child_service_name -%>"
|
||||
<%- end -%>
|
||||
<%- if @disable_checks -%>
|
||||
disable_checks = <%= @disable_checks -%>
|
||||
disable_checks = <%= @disable_checks %>
|
||||
<%- end -%>
|
||||
<%- if @disable_notifications -%>
|
||||
disable_notifications = <%= @disable_notifications -%>
|
||||
disable_notifications = <%= @disable_notifications %>
|
||||
<%- end -%>
|
||||
<%- if @period -%>
|
||||
period = "<%= @period -%>"
|
||||
|
@ -37,9 +37,9 @@ apply Dependency "<%= @object_name %>" to "<%= @object_type %>"{
|
|||
states = [ <%- @states.each do |state| -%> <%= state %>, <%- end -%>]
|
||||
<%- end -%>
|
||||
<%- if @assign_where -%>
|
||||
assign where <%= @assign_where -%>
|
||||
assign where <%= @assign_where %>
|
||||
<%- end -%>
|
||||
<%- if @ignore_where -%>
|
||||
ignore where <%= @ignore_where -%>
|
||||
ignore where <%= @ignore_where %>
|
||||
<%- end -%>
|
||||
}
|
||||
|
|
|
@ -40,34 +40,34 @@ apply Service "<%= @object_servicename %>" to Host {
|
|||
<%- end -%>
|
||||
<%- end -%>
|
||||
<%- if @max_check_attempts -%>
|
||||
max_check_attempts = <%= @max_check_attempts -%>
|
||||
max_check_attempts = <%= @max_check_attempts %>
|
||||
<%- end -%>
|
||||
<%- if @check_period -%>
|
||||
check_period = <%= @check_period -%>
|
||||
check_period = <%= @check_period %>
|
||||
<%- end -%>
|
||||
<%- if @check_interval -%>
|
||||
check_interval = <%= @check_interval -%>
|
||||
check_interval = <%= @check_interval %>
|
||||
<%- end -%>
|
||||
<%- if @retry_interval -%>
|
||||
retry_interval = <%= @retry_interval -%>
|
||||
retry_interval = <%= @retry_interval %>
|
||||
<%- end -%>
|
||||
<%- if @enable_notifications -%>
|
||||
enable_notifications = <%= @enable_notifications -%>
|
||||
enable_notifications = <%= @enable_notifications %>
|
||||
<%- end -%>
|
||||
<%- if @enable_active_checks -%>
|
||||
enable_active_checks = <%= @enable_active_checks -%>
|
||||
enable_active_checks = <%= @enable_active_checks %>
|
||||
<%- end -%>
|
||||
<%- if @enable_passive_checks -%>
|
||||
enable_passive_checks = <%= @enable_passive_checks -%>
|
||||
enable_passive_checks = <%= @enable_passive_checks %>
|
||||
<%- end -%>
|
||||
<%- if @enable_event_handler -%>
|
||||
enable_event_handler = <%= @enable_event_handler -%>
|
||||
enable_event_handler = <%= @enable_event_handler %>
|
||||
<%- end -%>
|
||||
<%- if @enable_flapping -%>
|
||||
enable_flapping = <%= @enable_flapping -%>
|
||||
enable_flapping = <%= @enable_flapping %>
|
||||
<%- end -%>
|
||||
<%- if @enable_perfdata -%>
|
||||
enable_perfdata = <%= @enable_perfdata -%>
|
||||
enable_perfdata = <%= @enable_perfdata %>
|
||||
<%- end -%>
|
||||
<%- if @event_command -%>
|
||||
event_command = "<%= @event_command -%>"
|
||||
|
|
|
@ -21,10 +21,10 @@ object Dependency "<%= @object_name %>" {
|
|||
child_service_name = "<%= @child_service_name -%>"
|
||||
<%- end -%>
|
||||
<%- if @disable_checks -%>
|
||||
disable_checks = <%= @disable_checks -%>
|
||||
disable_checks = <%= @disable_checks %>
|
||||
<%- end -%>
|
||||
<%- if @disable_notifications -%>
|
||||
disable_notifications = <%= @disable_notifications -%>
|
||||
disable_notifications = <%= @disable_notifications %>
|
||||
<%- end -%>
|
||||
<%- if @period -%>
|
||||
period = "<%= @period -%>"
|
||||
|
|
|
@ -37,34 +37,34 @@ object Host "<%= @object_hostname %>" {
|
|||
check_command = "<%= @check_command -%>"
|
||||
<%- end -%>
|
||||
<%- if @max_check_attempts -%>
|
||||
max_check_attempts = <%= @max_check_attempts -%>
|
||||
max_check_attempts = <%= @max_check_attempts %>
|
||||
<%- end -%>
|
||||
<%- if @check_period -%>
|
||||
check_period = <%= @check_period -%>
|
||||
check_period = <%= @check_period %>
|
||||
<%- end -%>
|
||||
<%- if @check_interval -%>
|
||||
check_interval = <%= @check_interval -%>
|
||||
check_interval = <%= @check_interval %>
|
||||
<%- end -%>
|
||||
<%- if @retry_interval -%>
|
||||
retry_interval = <%= @retry_interval -%>
|
||||
retry_interval = <%= @retry_interval %>
|
||||
<%- end -%>
|
||||
<%- if @enable_notifications -%>
|
||||
enable_notifications = <%= @enable_notifications -%>
|
||||
enable_notifications = <%= @enable_notifications %>
|
||||
<%- end -%>
|
||||
<%- if @enable_active_checks -%>
|
||||
enable_active_checks = <%= @enable_active_checks -%>
|
||||
enable_active_checks = <%= @enable_active_checks %>
|
||||
<%- end -%>
|
||||
<%- if @enable_passive_checks -%>
|
||||
enable_passive_checks = <%= @enable_passive_checks -%>
|
||||
enable_passive_checks = <%= @enable_passive_checks %>
|
||||
<%- end -%>
|
||||
<%- if @enable_event_handler -%>
|
||||
enable_event_handler = <%= @enable_event_handler -%>
|
||||
enable_event_handler = <%= @enable_event_handler %>
|
||||
<%- end -%>
|
||||
<%- if @enable_flapping -%>
|
||||
enable_flapping = <%= @enable_flapping -%>
|
||||
enable_flapping = <%= @enable_flapping %>
|
||||
<%- end -%>
|
||||
<%- if @enable_perfdata -%>
|
||||
enable_perfdata = <%= @enable_perfdata -%>
|
||||
enable_perfdata = <%= @enable_perfdata %>
|
||||
<%- end -%>
|
||||
<%- if @event_command -%>
|
||||
event_command = "<%= @event_command -%>"
|
||||
|
|
|
@ -23,9 +23,9 @@ object HostGroup "<%= @object_hostgroup_name %>" {
|
|||
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
|
||||
<%- end -%>
|
||||
<%- if @assign_where -%>
|
||||
assign where <%= @assign_where -%>
|
||||
assign where <%= @assign_where %>
|
||||
<%- end -%>
|
||||
<%- if @ignore_where -%>
|
||||
ignore where <%= @ignore_where -%>
|
||||
ignore where <%= @ignore_where %>
|
||||
<%- end -%>
|
||||
}
|
||||
|
|
|
@ -54,11 +54,11 @@ object Notification "<%= @object_notificationname %>" {
|
|||
<%- end -%>
|
||||
<%- if @interval -%>
|
||||
|
||||
interval = <%= @inteval -%>
|
||||
interval = <%= @inteval %>
|
||||
<%- end -%>
|
||||
<%- if @period -%>
|
||||
|
||||
period = <%= @period -%>
|
||||
period = <%= @period %>
|
||||
<%- end -%>
|
||||
<%- if @types.empty? !=true -%>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ object ScheduledDowntime "<%= @object_scheduleddowntimename %>" {
|
|||
fixed = false
|
||||
<%- end -%>
|
||||
<%- if @duration -%>
|
||||
duration = <%= @duration -%>
|
||||
duration = <%= @duration %>
|
||||
<%- end -%>
|
||||
<%- if @ranges.empty? != true -%>
|
||||
|
||||
|
|
|
@ -34,34 +34,34 @@ object Service "<%= @object_servicename %>" {
|
|||
check_command = "<%= @check_command -%>"
|
||||
<%- end -%>
|
||||
<%- if @max_check_attempts -%>
|
||||
max_check_attempts = <%= @max_check_attempts -%>
|
||||
max_check_attempts = <%= @max_check_attempts %>
|
||||
<%- end -%>
|
||||
<%- if @check_period -%>
|
||||
check_period = <%= @check_period -%>
|
||||
check_period = <%= @check_period %>
|
||||
<%- end -%>
|
||||
<%- if @check_interval -%>
|
||||
check_interval = <%= @check_interval -%>
|
||||
check_interval = <%= @check_interval %>
|
||||
<%- end -%>
|
||||
<%- if @retry_interval -%>
|
||||
retry_interval = <%= @retry_interval -%>
|
||||
retry_interval = <%= @retry_interval %>
|
||||
<%- end -%>
|
||||
<%- if @enable_notifications -%>
|
||||
enable_notifications = <%= @enable_notifications -%>
|
||||
enable_notifications = <%= @enable_notifications %>
|
||||
<%- end -%>
|
||||
<%- if @enable_active_checks -%>
|
||||
enable_active_checks = <%= @enable_active_checks -%>
|
||||
enable_active_checks = <%= @enable_active_checks %>
|
||||
<%- end -%>
|
||||
<%- if @enable_passive_checks -%>
|
||||
enable_passive_checks = <%= @enable_passive_checks -%>
|
||||
enable_passive_checks = <%= @enable_passive_checks %>
|
||||
<%- end -%>
|
||||
<%- if @enable_event_handler -%>
|
||||
enable_event_handler = <%= @enable_event_handler -%>
|
||||
enable_event_handler = <%= @enable_event_handler %>
|
||||
<%- end -%>
|
||||
<%- if @enable_flapping -%>
|
||||
enable_flapping = <%= @enable_flapping -%>
|
||||
enable_flapping = <%= @enable_flapping %>
|
||||
<%- end -%>
|
||||
<%- if @enable_perfdata -%>
|
||||
enable_perfdata = <%= @enable_perfdata -%>
|
||||
enable_perfdata = <%= @enable_perfdata %>
|
||||
<%- end -%>
|
||||
<%- if @event_command -%>
|
||||
event_command = "<%= @event_command -%>"
|
||||
|
|
|
@ -23,9 +23,9 @@ object ServiceGroup "<%= @object_servicegroup_name %>" {
|
|||
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
|
||||
<%- end -%>
|
||||
<%- if @assign_where -%>
|
||||
assign where <%= @assign_where -%>
|
||||
assign where <%= @assign_where %>
|
||||
<%- end -%>
|
||||
<%- if @ignore_where -%>
|
||||
ignore where <%= @ignore_where -%>
|
||||
ignore where <%= @ignore_where %>
|
||||
<%- end -%>
|
||||
}
|
||||
|
|
|
@ -22,6 +22,6 @@ object StatusDataWriter "<%= @object_statusdatawritername %>" {
|
|||
objects_path = "<%= @objects_path -%>"
|
||||
<%- end -%>
|
||||
<%- if @update_interval -%>
|
||||
update_interval = <%= @update_interval -%>
|
||||
update_interval = <%= @update_interval %>
|
||||
<%- end -%>
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ object User "<%= @object_username %>" {
|
|||
pager = "<%= @pager -%>"
|
||||
<%- end -%>
|
||||
<%- if @enable_notifications -%>
|
||||
enable_notifications = <%= @enable_notifications -%>
|
||||
enable_notifications = <%= @enable_notifications %>
|
||||
<%- end %>
|
||||
<%- if @vars.empty? != true -%>
|
||||
<%- @vars.each_pair do |key, value| -%>
|
||||
|
|
Loading…
Reference in a new issue