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"
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