]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/logstash/recipes/default.rb
Add IPv6 addresses to dulcy
[chef.git] / cookbooks / logstash / recipes / default.rb
index e3261d0d12852c7b25d027a0c0628f6d23f05921..46bc3fea03d304b32861a7baea2f7a8217d7e044 100644 (file)
@@ -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