Hi,

I am having an issue trying to use the inline_template function to return an array. This is what I do:

$array = inline_template ("<%= a=['a1','b2','c3']; a %>")
notify {"array: ${array}":}

And that works, showing the typical comma-less string:
notice: /Stage[main]//Notify[array: a1b2c3]/message: defined 'message' as 'array: a1b2c3'

But when I try to access just one element of the array, it breaks:
notify {"array: ${array[1]}":}

And I get:
err: Could not retrieve catalog from remote server: Error 400 on SERVER: array is not an hash or array when accessing it with 1 at /home/pablof/puppet-tree/manifests/groups.pp:27 on node

I have been trying, and it seems like the inline_template recognizes external array declared this way (as arrays) but Puppet doesn't... am I missing something? Do I have to convert the output to some type Puppet understands?

Thanks!!
Pablo

--
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to