FAQ
Hello guys,

I would like to get some help with puppet about using an array in a
template.

I've a custom facts that return me this:

tsm_vmp / /home /tmp /var/tmp /usr /var

I have a class that use this facts to split it on every space and to a
an entry in a template for each value, here is the code I use for
this:

$virtualmountpoints = split($tsm_vmp, ' ')
...
"/opt/tivoli/tsm/client/ba/bin/dsm.sys":
owner => root,
group => root,
mode => 0600,
content => template("tsm/dsm.sys.erb"),

That's what's I have in my template

<% virtualmountpoints.each do |fs| -%>
virtualmountpoint <%= fs %>
<% end -%>



Thats what I get:
virtualmountpoint /
/home
/tmp
/var/tmp
/usr
/var

but I would like to get instead:
virtualmountpoint /
virtualmountpoint /home
virtualmountpoint /tmp
virtualmountpoint /var/tmp
virtualmountpoint /usr
virtualmountpoint /var


Do you know how to do this?

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

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedApr 24, '12 at 8:49a
activeApr 24, '12 at 11:32a
posts5
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase