]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/logstash/recipes/default.rb
Switch to using inspec for testing
[chef.git] / cookbooks / logstash / recipes / default.rb
index e3261d0d12852c7b25d027a0c0628f6d23f05921..bbe8450214f4168e0a770c47188987e6dbda7c1f 100644 (file)
@@ -23,7 +23,7 @@ include_recipe "networking"
 keys = data_bag_item("logstash", "keys")
 
 package %w[
-  openjdk-8-jre-headless
+  openjdk-11-jre-headless
   logstash
 ]
 
@@ -76,13 +76,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