From 8006ea3d0d2aa722837655be00e7d3d940527cea Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 16 Oct 2016 21:43:07 +0100 Subject: [PATCH] Sort logstash server firewall rules by node name --- cookbooks/logstash/recipes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5