Hiera isn't running the function for you. No worries. You can change it like this:
logstash::configfiles:
'input_apache':
content: 'adriatic/logstash/input_apache.erb'
order: '10'
define logstash::configfile(
$content = undef,
$source = undef,
$order = 10
) {
file_fragment { $name:
tag => "LS_CONFIG_${::fqdn}",
content => template($content),
source => $source,
order => $order,
before => [ File_concat['ls-config'] ]
}
}
What you're doing with specifying both a source and a content... I'm not sure what you're going for there. Generally you use just one. Calling template on an undefined string might cause you issues, so you might have to add some error checking. I would recommend removing the source functionality from this defined type.
Thanks,
Spencer
--
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 puppet-users+unsubscribe@googlegroups.com.
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.