That didn't exactly help me out.

I would like to include one .erb from inside another .erb (vs
concatenating .erbs together, which is what I'm gathering is what
happens when done in the manifest).

The file path I gave was an example, as the one given is written in a
way that suggests absolute system paths.

This is the entry in question:
http://docs.puppetlabs.com/guides/templating.html#combining-templates

On Apr 6, 6:48 pm, Nan Liu <n...@puppetlabs.com> wrote:
> On Wed, Apr 6, 2011 at 2:54 PM, draeath <drae...@gmail.com> wrote:
> > In the puppet documentation, it is stated:
>
> > "You can also use templates to fill in variables in addition to
> > filling out file contents."
> > template('/path/to/template1','/path/to/template2')
>
> I don't have the specific document, so not sure if I'm missing any
> context, I presume this simply means:
>
> $foo = template('/path/to/foo.erb')
>
> file { '/etc/a':
>   content => template('/path/to/foo.erb')
>
> }
> > My question: is this done in the ERB file, or in the puppet manifest?
> > If done in the ERB file, I assume it also has to be within <% %> tags,
> > but unlike all the other examples in the documentation it is not
> > presented this way.
>
> > The /path/to/ - is there some way to properly do this, or do I need to
> > do '/etc/puppet/files/templates/...../foo.erb' ?
>
> Please follow the modules 
> convention:http://docs.puppetlabs.com/guides/modules.html
>
> For portability, place the file in $module_name/templates/ directory
> and use the module name:
> $foo = template("${module_name}/foo.erb")
>
> Thanks,
>
> Nan

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