I'm looking at this code:

define logstash::configfile(
  $content = undef,
  $source = undef,
  $order = 10
) {

  file_fragment { $name:
    tag     => "LS_CONFIG_${::fqdn}",
    content => $content,
    source  => $source,
    order   => $order,
    before  => [ File_concat['ls-config'] ]
  }
}


Now, I'm doing a create_resource on that one:

  $logstash_configs = hiera_hash('logstash::configfiles', {})
  create_resources(::Logstash::Configfile, $logstash_configs)


Problem is I cannot force a content to be an erb template....

Whatever I write in hiera, it is interpreted as text, for example:


logstash::configfiles:
  'input_apache':
    content: "template('adriatic/logstash/input_apache.erb')"
    order:   '10'


Just writes text:
template('adriatic/logstash/input_apache.erb')

into logstash config file, while I expect it to parse a template.

What am I doing wrong? Is there a way to force Hiera to pass the value as a code and not as clear text?

Thank you

--
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/537FC58C.2070507%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to