lusis / chef-logstash

Semi-official Logstash cookbook
Other
271 stars 353 forks source link

config not working #481

Closed danhiris closed 7 years ago

danhiris commented 7 years ago

When I declare templates for the config, I get a no implicit conversion of Symbol into String error.

There appears to be something weird with this but I can't quite pinpoint the issue:

  conf[:templates].each do |template, file|
    tp = template "#{conf[:path]}/#{::File.basename(template).chomp(::File.extname(template))}" do
danhiris commented 7 years ago

I resolved it by changing the logfile symbol to a string so instead of setting the key of the templates hash like this: templates( logfile: 'logfiletemplate.erb' ) I'm setting it like this: templates( 'logfile' => 'logfiletemplate.erb' )