Hi

I am busy writing puppet modules for logstash, and want to export tokens I 
get from the hiera application or %{calling_module} role. 

So each of my applications/modules that will make use of the shipper module 
and have the inputs.conf file installed and populated will have the 
following:

class name::deployment inherits name::params {
include logstash::shipper
}

The token I want to export for each app/module is:
$logstash_logs = hiera('logstash_logs')

And this is taken from the %{calling_module} role like:
logstash_logs:
javabridge: 'javabridge-log.log'
actions_javabridge: 'ual/actions-javabridge.log'


The template that is deployed via logstash::shipper has:
<% @logstash_logs.each_pair do |key, value| -%>
  file {
    type => "<%= key %>"
    path => [ "<%= logdir %>/<%= value %>" ]
    tags => [ "<%= key %>" ]
  }
<% end -%>

Unfortunately the name:deployment class that is calling include 
logstash::shipper is not passing the tokens. 

The error I get is:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Failed to parse template logstash/input.conf.erb:
  Filepath: /usr/lib/ruby/site_ruby/1.8/puppet/parser/templatewrapper.rb
  Line: 81
  Detail: Could not find value for 'logstash_logs' at 
/etc/puppet/environments/bstanding/modules/logstash/templates/input.conf.erb:1
 at 
/etc/puppet/environments/bstanding/modules/logstash/manifests/shipper.pp:15 
on node free-4574-u37.dev.marinsw.net
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Any idea how best to achieve this, keeping in mind that I will need to 
export different options for each module / app I am deploying with the 
shipper?

Many thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2daae356-e4c9-40c3-b3f8-f82f49c157bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to