type generate a file based on each member of the array. However In the erb
file I also have values that i want set specific to that file that is
generated.
When i call the defined type how do i pass in the values that i want used
for that file from my class.
Example
# MY class
class test (
$my_files = hiera_array ('my_files', ['test','test1']),
) {
createFiles { $my_files: }
}
# My Defined type
define createFiles (
){
file { "/tmp/${name}":
template => "/etc/puppet/modules/test/template/test.erb"
}
}
## My erb file
<% @proxy_realms.each do | realm | -%>
realm <% realm %> {
pool = <%= @name %>-pool
nostrip
}
<% end -%>
# here is my problem - In my ERB file each realm will be different for each
file generated. How can I call my defined type, generate a new file for
each type and have a array get generated based on the settings for that file
I tied creating a array called realm in the class definition but then each
file that got generated had the values for that array.
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.