On Fri, Feb 6, 2009 at 9:12 AM, Dan Bode <bodepd@gmail.com>
wrote:> Is it possible for a custom function to return an array?
>
> I am trying to have a function return an array that then can be used as an
> array to create types.
>
> IE:
> get_array() -> ["1", "2", "3"]
>
> array = get_array()
> file{array:}
Yes, you can return an array from a function. There is one odd case
where you must assign the array to a variable first -- ie. you can''t do
something like:
file { get_array(): .... }
See http://projects.reductivelabs.com/issues/1652
Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---