X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/21055bd108fecc2b7309c60358f86ae3afecfcfa..9eb8943ae3e825d148f52860473a892f8ea7366d:/cookbooks/logstash/recipes/default.rb diff --git a/cookbooks/logstash/recipes/default.rb b/cookbooks/logstash/recipes/default.rb index df54a7280..65b6035cb 100644 --- a/cookbooks/logstash/recipes/default.rb +++ b/cookbooks/logstash/recipes/default.rb @@ -22,26 +22,10 @@ include_recipe "networking" keys = data_bag_item("logstash", "keys") package %w[ - default-jre-headless + openjdk-8-jre-headless logstash ] -cookbook_file "/var/lib/logstash/lumberjack.crt" do - source "lumberjack.crt" - user "root" - group "logstash" - mode 0o644 - notifies :restart, "service[logstash]" -end - -file "/var/lib/logstash/lumberjack.key" do - content keys["lumberjack"].join("\n") - user "root" - group "logstash" - mode 0o640 - notifies :restart, "service[logstash]" -end - cookbook_file "/var/lib/logstash/beats.crt" do source "beats.crt" user "root" @@ -70,6 +54,14 @@ file "/etc/logrotate.d/logstash" do mode 0o644 end +template "/etc/default/logstash" do + source "logstash.default.erb" + user "root" + group "root" + mode 0o644 + notifies :restart, "service[logstash]" +end + service "logstash" do action [:enable, :start] supports :status => true, :restart => true, :reload => true