From: Tom Hughes Date: Sun, 16 Oct 2016 20:43:07 +0000 (+0100) Subject: Sort logstash server firewall rules by node name X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/8006ea3d0d2aa722837655be00e7d3d940527cea Sort logstash server firewall rules by node name --- diff --git a/cookbooks/logstash/recipes/default.rb b/cookbooks/logstash/recipes/default.rb index cf8405ff8..3f2c98f91 100644 --- a/cookbooks/logstash/recipes/default.rb +++ b/cookbooks/logstash/recipes/default.rb @@ -66,7 +66,7 @@ end forwarders = search(:node, "recipes:logstash\\:\\:forwarder") # ~FC010 -forwarders.each do |forwarder| +forwarders.sort_by { |n| n[:fqdn] }.each do |forwarder| forwarder.interfaces(:role => :external) do |interface| firewall_rule "accept-lumberjack-#{forwarder}" do action :accept @@ -82,7 +82,7 @@ end gateways = search(:node, "roles:gateway") # ~FC010 -gateways.each do |gateway| +gateways.sort_by { |n| n[:fqdn] }.each do |gateway| gateway.interfaces(:role => :external) do |interface| firewall_rule "accept-lumberjack-#{gateway}" do action :accept