Hi Guys,

I am very new to Puppet and installed 3.8. I tried creating template using 
array type variable but I got output as string.

My sample code as below:

init.pp
-------
$servers = ['facter', 'hiera', 'mco', 'puppet', 'puppetserver'],

config.pp 
----------------------
$servers     = "$::apache::servers",

file {"/root/welcome":
    ensure => present,
    content => template('apache/hello.erb'),
 

hello.erb
------------------
<% @servers.each do |val| -%>
Welcome <%= val %>
<% end -%>


output as :
==========

cat /root/welcome
Welcome facterhieramcopuppetpuppetserver

Any help will be appreciated.

Thanks,
Arun

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e04f554b-1329-4b4b-afa4-1ca445838490%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to