Issue #7991 has been updated by Daniel Pittman. Branch set to https://github.com/mmrobins/puppet/commit/9292d4c998296fd5aa631adb9c235b1f0c4e4204
This looks like a duplicate of #4549, code found here https://github.com/mmrobins/puppet/commit/9292d4c998296fd5aa631adb9c235b1f0c4e4204 It looks like that was merged, but I can't find a trace of it in the tree, which is odd. We will retest that, and remerge it shortly. ---------------------------------------- Bug #7991: Issue with using custom functions in templates. https://projects.puppetlabs.com/issues/7991 Author: Trevor Vaughan Status: Accepted Priority: Normal Assignee: Category: parser Target version: Affected Puppet version: 2.6.0 Keywords: custom function, template Branch: https://github.com/mmrobins/puppet/commit/9292d4c998296fd5aa631adb9c235b1f0c4e4204 To use a custom function in a template, you must do something like the following: `$var = inline_template("<%= Puppet::Parser::Functions::function('myfunction'); '' %><%= scope.function_myfunction(options) %>")` Furthermore, to make this work in any order, you must stick something like the following in your code: `if false { myfunction('blah') }` However, if you do this *anywhere at all*, you can no longer do the following: `$var = myfunction('foo')` Why? I have no idea! But it certainly doesn't seem like it should work this way. Seems to affect all Puppet versions that I've tried. <= 2.6.6 -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
