X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/0c79b5dbf9284104cb1ab66bd0673f9d41dd08bd..50aea11082eaa90bd37593b9c987d38a082f4e1b:/cookbooks/logstash/recipes/default.rb diff --git a/cookbooks/logstash/recipes/default.rb b/cookbooks/logstash/recipes/default.rb index e3261d0d1..46bc3fea0 100644 --- a/cookbooks/logstash/recipes/default.rb +++ b/cookbooks/logstash/recipes/default.rb @@ -23,8 +23,9 @@ include_recipe "networking" keys = data_bag_item("logstash", "keys") package %w[ - openjdk-8-jre-headless + openjdk-11-jre-headless logstash + logrotate ] cookbook_file "/var/lib/logstash/beats.crt" do @@ -76,13 +77,13 @@ end forwarders = [] -forwarders << search(:node, "recipes:logstash\\:\\:forwarder").collect do |forwarder| - forwarder.ipaddresses(:role => :external) -end.flatten +search(:node, "recipes:logstash\\:\\:forwarder").each do |forwarder| + forwarders.append(forwarder.ipaddresses(:role => :external)) +end -forwarders << search(:node, "roles:gateway").collect do |forwarder| - forwarder.ipaddresses(:role => :external) -end.flatten +search(:node, "roles:gateway").each do |forwarder| + forwarders.append(forwarder.ipaddresses(:role => :external)) +end firewall_rule "accept-logstash" do action :accept