I have a module that needs to create several, similar config files, so I am
using a template.
file { "foo" :
ensure => file,
content => template("MyTempalte.erb"),
}
file { "bar" :
ensure => file,
content => template("MyTempalte.erb"),
}
So far, so good. The issue is that I need to put the name of the file into
the config file that is created from the template. I tried <%= file %>,
but that gives the name of the template file, MyTemplate.erb What I need
is the name of the config file e.g. foo or bar. I poked around the
documentation but could not the right incantation. Any ideas?
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/1689c0a4-9117-46ac-b16b-90b9570464bc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.