]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/logstash/recipes/default.rb
Use multipackage installs throughout
[chef.git] / cookbooks / logstash / recipes / default.rb
index cf8405ff8605b8e83927f629290e6f5918d84581..fd758d8802237bc0bf9d8baae3599bd20c05a334 100644 (file)
@@ -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