Hi all,
I have things working such that I can call
#init.pp
$myvar = my_custom_func("arguments")
file { "/tmp/foo":
content => template("mymodule/test_template.erb")
}
# test_template.erb
<%= myvar %>
And all is well.
However, I'd ideally like to say:
#init.pp
$myvar = "some_key_value"
file { "/tmp/foo":
content => template("mymodule/test_template.erb")
}
# test_template.erb
<%= my_custom_func($myvar) %>
I found this:
Which showed how to call 'puppet core functions', like
<%= scope.function_template("mymodule/othertemplate.erb") %>
which is kind of cool, but.... scope.function_mycustomfunction doesn't seem to work.
Any magical invocation that will make it work?
Thanks,
Josh