X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/a68415b8f2bf106b6ea5948b0605c897b516ef4f..19aeb7bfffb852ab8be005c004b1ef8e555a5b77:/cookbooks/logstash/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/logstash/recipes/default.rb b/cookbooks/logstash/recipes/default.rb index cf8405ff8..fd758d880 100644 --- a/cookbooks/logstash/recipes/default.rb +++ b/cookbooks/logstash/recipes/default.rb @@ -21,8 +21,10 @@ include_recipe "networking" keys = data_bag_item("logstash", "keys") -package "default-jre-headless" -package "logstash" +package %w[ + default-jre-headless + logstash +] cookbook_file "/var/lib/logstash/lumberjack.crt" do source "lumberjack.crt" @@ -66,7 +68,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 +84,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