]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/logstash/recipes/default.rb
Update logstash cookbook for Ubuntu 16.04
[chef.git] / cookbooks / logstash / recipes / default.rb
index 55675fa71ee78042aef6b81d8c2757eda4cd798b..ed9ffb7034e6b7194f9cfddd9902e1841898b189 100644 (file)
@@ -21,7 +21,7 @@ include_recipe "networking"
 
 keys = data_bag_item("logstash", "keys")
 
-package "openjdk-7-jre-headless"
+package "default-jre-headless"
 package "logstash"
 
 cookbook_file "/var/lib/logstash/lumberjack.crt" do
@@ -48,6 +48,10 @@ template "/etc/logstash/conf.d/chef.conf" do
   notifies :restart, "service[logstash]"
 end
 
+file "/etc/logrotate.d/logstash" do
+  mode 0644
+end
+
 service "logstash" do
   action [:enable, :start]
   supports :status => true, :restart => true
@@ -60,7 +64,7 @@ template "/etc/cron.daily/expire-logstash" do
   mode 0755
 end
 
-forwarders = search(:node, "recipes:logstash\\:\\:forwarder")
+forwarders = search(:node, "recipes:logstash\\:\\:forwarder") # ~FC010
 
 forwarders.each do |forwarder|
   forwarder.interfaces(:role => :external) do |interface|