On Wednesday, September 25, 2013 7:12:29 AM UTC-5, John Simpson wrote:
Greetings.
When defining a file resource, why does the ${name} variable sometimes
expand to the filename being maintained, and sometimes to the module name?
It doesn't. The ${name} variable always resolves to the
file { '/etc/httpd/conf.d/ssl.conf' :
ensure = file ,
content = template ( ${module_name}{$name}.erb ) ,
}
Here $name expands to apache, so the filename passed to template() is
apacheapache.erb, rather than the expected and desired value