On 01/16/2012 04:23 PM, Antidot SAS wrote:
> Hi everyone,
> 
> 
> Is there a way to display correctly an array, each time I am trying to
> 'notice' an array I have something like that:
> Here is the code:
> $array = [ 'test' , 'test2']
> 
> notice("Here is the $array")
> 
> The ouput is as follow:
> Here is the testtest2
> 
> 
> There is no way to put a clean IFS for the ouput...

Seeing as this has not been mentioned in the thread yet, I'm compelled
to add:

$array_to_str = inline_template("<%= array * ', ' %>")

or even

notify { "my-notify":
  message => inline_template("Here is the <%= array * ', ' %>.");
}

Cheers,
Felix

-- 
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