http://docs.puppetlabs.com/guides/templating.html#using-functions-within-templates
The arguments of the function must be provided as an array, even if there is only one argument. However, (and I am just discovering this myself), http://docs.puppetlabs.com/hiera/1/puppet.html#using-the-lookup-functions-from-templates Using the Lookup Functions From Templates In general, don’t use the Hiera functions from templates. That pattern is too obscure, and will hurt your code’s maintainability — if a co-author of your code needs to change the Hiera invocations and is searching.pp files for them, they might miss the extra invocations in the template. Even if only one person is maintaining this code, they’re likely to make similar mistakes after a few months have passed. It’s much better to use the lookup functions in a Puppet manifest, assign their value to a local variable, and then reference the variable from the template. This keeps the function calls isolated in one layer of your code, where they’ll be easy to find if you need to modify them later or document them for other users. On May 10, 2013, at 7:19 AM, Brian Lalor wrote: > On May 10, 2013, at 7:18 AM, Jonathan Gazeley > <jonathan.gaze...@bristol.ac.uk> wrote: > >> ipaddr = <%= scope.function_hiera(["jrs_config_server1"]) %> > > You're passing in an array; is that intentional? > > -- > Brian Lalor > bla...@bravo5.org > > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.