Great thanks a lot.

On Mon, Apr 11, 2011 at 4:54 AM, Allan Clark <napt...@gmail.com> wrote:
>> Hi Allan, would mind sharing a piece of manifest/template showing how
>> I can use that statement?
>>
>
> The below code will look for the files mentioned in $filelist inside
> the files directory of the module "some_module"
> and import the contents of the file in to the template. In my case
> each file contains a single line so it works out
> rather well.
>
> Hope this helps.
>
> Allan
>
> $filelist = [ 'file1.txt', 'file2.txt']
>
> <% filelist.sort.each do |my_file| -%>
> <%
> File.open(Puppet::Module::find_template("some_module/"+my_file)).each
> { |line| _erbout << line } -%>
> <% end -%>
>
> --
> 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.
>
>

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