Merge branch 'alexxxxx-feature/fixhashordering' into develop

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

refs# 8154: https://dev.icinga.org/issues/8154
This commit is contained in:
Nick Chappell 2015-01-13 20:23:15 -08:00
commit 434a559f2c
14 changed files with 33 additions and 33 deletions

View file

@ -26,10 +26,10 @@ apply Notification "<%= @object_notificationname %>" to Host {
command = "<%= @command %>"
<%- end -%>
<%- if @vars.empty? != true -%>
<%- @vars.each_pair do |key,value| -%>
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <% if value.class == String %><%= value %>
<%- else -%>{
<%- value.each_pair do |k,v| -%>
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
<%= k %> = <%= v %>
<%- end -%>
}
@ -44,7 +44,7 @@ apply Notification "<%= @object_notificationname %>" to Host {
<%- end -%>
<%- if @times.empty? != true -%>
times = {
<%- @times.each_pair do |key,value| -%>
<%- @times.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = "<%= value %>"
<%- end -%>
}

View file

@ -29,10 +29,10 @@ apply Notification "<%= @object_notificationname %>" to Service {
command = "<%= @command %>"
<%- end -%>
<%- if @vars.empty? != true -%>
<%- @vars.each_pair do |key,value| -%>
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <% if value.class == String %><%= value %>
<%- else -%>{
<%- value.each_pair do |k,v| -%>
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
<%= k %> = <%= v %>
<%- end -%>
}
@ -47,7 +47,7 @@ apply Notification "<%= @object_notificationname %>" to Service {
<%- end -%>
<%- if @times.empty? != true -%>
times = {
<%- @times.each_pair do |key,value| -%>
<%- @times.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = "<%= value %>"
<%- end -%>
}

View file

@ -35,7 +35,7 @@ apply Service "<%= @object_servicename %>" to Host {
check_command = "<%= @check_command -%>"
<%- end -%>
<%- if @vars.empty? != true -%>
<%- @vars.each_pair do |key, value| -%>
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
vars.<%= key %> = "<%= value %>"
<%- end -%>
<%- end -%>

View file

@ -27,7 +27,7 @@ object CheckCommand "<%= @object_checkcommandname %>" {
<%- @arguments.each_with_index do |(key,value), i| -%>
<%= key %> = <% if value.class == String %><%= value %>
<%- else -%>{
<%- value.each_pair do |k,v| -%>
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
<%= k %> = <%= v %>
<%- end -%>
}
@ -37,10 +37,10 @@ object CheckCommand "<%= @object_checkcommandname %>" {
<%- end -%>
<%- if @vars -%>
<%- @vars.each_pair do |key,value| -%>
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <% if value.class == String %><%= value %>
<%- else -%>{
<%- value.each_pair do |k,v| -%>
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
<%= k %> = <%= v %>
<%- end -%>
}
@ -54,7 +54,7 @@ object CheckCommand "<%= @object_checkcommandname %>" {
<%- if @env -%>
env = {
<%- @vars.each_pair do |key,value| -%>
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <%= value %>
<%- end -%>
}

View file

@ -27,7 +27,7 @@ object EventCommand "<%= @object_eventcommandname %>" {
<%- @arguments.each_with_index do |(key,value), i| -%>
<%= key %> = <% if value.class == String %><%= value %>
<%- else -%>{
<%- value.each_pair do |k,v| -%>
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
<%= k %> = <%= v %>
<%- end -%>
}
@ -37,10 +37,10 @@ object EventCommand "<%= @object_eventcommandname %>" {
<%- end -%>
<%- if @vars.empty? -%>
<%- @vars.each_pair do |key,value| -%>
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <% if value.class == String %><%= value %>
<%- else -%>{
<%- value.each_pair do |k,v| -%>
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
<%= k %> = <%= v %>
<%- end -%>
}
@ -54,7 +54,7 @@ object EventCommand "<%= @object_eventcommandname %>" {
<%- if @env.empty? != true -%>
env = {
<%- @env.each_pair do |key,value| -%>
<%- @env.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <%= value %>
<%- end -%>
}

View file

@ -29,10 +29,10 @@ object Host "<%= @object_hostname %>" {
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
<%- end -%>
<%- if @vars.empty? != true -%>
<%- @vars.each_pair do |key, value| -%>
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
<%- if value.is_a?(Hash) -%>
vars.<%= key %> = {
<%- value.each_pair do |subkey,subvalue|-%>
<%- value.sort_by {|subkey,subvalue| subkey}.each do |subkey,subvalue| -%>
<%= subkey %> = <%= subvalue %>
<%- end -%>
}

View file

@ -45,7 +45,7 @@ object IdoMysqlConnection "mysql-ido" {
<%- if @cleanup.empty? != true -%>
cleanup = {
<%- @cleanup.each_pair do |key, value| -%>
<%- @cleanup.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <%= value %>
<%- end -%>
}
@ -54,4 +54,4 @@ object IdoMysqlConnection "mysql-ido" {
<%- if @categories.length != 0 -%>
categories = <%= @categories.map {|category| "#{category}"}.join(' | ') %>
<%- end -%>
}
}

View file

@ -45,7 +45,7 @@ object IdoPgsqlConnection "pgsql-ido" {
<%- if @cleanup.empty? != true -%>
cleanup = {
<%- @cleanup.each_pair do |key, value| -%>
<%- @cleanup.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <%= value %>
<%- end -%>
}
@ -54,4 +54,4 @@ object IdoPgsqlConnection "pgsql-ido" {
<%- if @categories.length != 0 -%>
categories = <%= @categories.map {|category| "#{category}"}.join(' | ') %>
<%- end -%>
}
}

View file

@ -26,10 +26,10 @@ object Notification "<%= @object_notificationname %>" {
<%- end -%>
<%- if @vars.empty? != true -%>
<%- @vars.each_pair do |key,value| -%>
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <% if value.class == String %><%= value %>
<%- else -%>{
<%- value.each_pair do |k,v| -%>
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
<%= k %> = <%= v %>
<%- end -%>
}
@ -47,7 +47,7 @@ object Notification "<%= @object_notificationname %>" {
<%- if @times.empty? != true -%>
times = {
<%- @times.each_pair do |key,value| -%>
<%- @times.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <%= value %>
<%- end -%>
}

View file

@ -27,7 +27,7 @@ object NotificationCommand "<%= @object_notificationcommandname %>" {
<%- @arguments.each_with_index do |(key,value), i| -%>
<%= key %> = <% if value.class == String %><%= value %>
<%- else -%>{
<%- value.each_pair do |k,v| -%>
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
<%= k %> = <%= v %>
<%- end -%>
}
@ -37,10 +37,10 @@ object NotificationCommand "<%= @object_notificationcommandname %>" {
<%- end -%>
<%- if @vars.empty? != true -%>
<%- @vars.each_pair do |key,value| -%>
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <% if value.class == String %><%= value %>
<%- else -%>{
<%- value.each_pair do |k,v| -%>
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
<%= k %> = <%= v %>
<%- end -%>
}
@ -54,7 +54,7 @@ object NotificationCommand "<%= @object_notificationcommandname %>" {
<%- if @env.empty? != true -%>
env = {
<%- @env.each_pair do |key,value| -%>
<%- @env.sort_by {|key, value| key}.each do |key, value| -%>
<%= key %> = <%= value %>
<%- end -%>
}

View file

@ -30,7 +30,7 @@ object ScheduledDowntime "<%= @object_scheduleddowntimename %>" {
<%- if @ranges.empty? != true -%>
ranges = {
<%- @ranges.each_pair do |key, value| -%>
<%- @ranges.sort_by {|key, value| key}.each do |key, value| -%>
"<%= key %>" = "<%= value %>"
<%- end -%>
}

View file

@ -26,7 +26,7 @@ object Service "<%= @object_servicename %>" {
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
<%- end -%>
<%- if @vars.empty? != true -%>
<%- @vars.each_pair do |key, value| -%>
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
vars.<%= key %> = "<%= value %>"
<%- end -%>
<%- end -%>

View file

@ -23,7 +23,7 @@ object TimePeriod "<%= @object_name %>" {
<%- end -%>
<%- if @ranges.empty? != true -%>
ranges = {
<%- @ranges.each_pair do |key,value| -%>
<%- @ranges.sort_by {|key, value| key}.each do |key, value| -%>
"<%= key %>" = "<%= value %>"
<%- end -%>
}

View file

@ -29,7 +29,7 @@ object User "<%= @object_username %>" {
enable_notifications = <%= @enable_notifications %>
<%- end %>
<%- if @vars.empty? != true -%>
<%- @vars.each_pair do |key, value| -%>
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
vars.<%= key %> = "<%= value %>"
<%- end -%>
<%- end -%>
@ -45,4 +45,4 @@ object User "<%= @object_username %>" {
<%- if @states.length != 0 -%>
states = [ <%- @states.each do |state| -%> <%= state %>, <%- end -%>]
<%- end -%>
}
}