Issue #4359 has been updated by Andrew Parker. Status changed from Accepted to Closed
As Stefan pointed out, this is possible by using `<%= file %>` ---------------------------------------- Feature #4359: a way for a template to get its own name, and the directory in which it resides https://projects.puppetlabs.com/issues/4359#change-82549 Author: Alan Barrett Status: Closed Priority: Normal Assignee: Category: functions Target version: Affected Puppet version: 0.25.5 Keywords: Branch: I'd like templates to be able to output things like "This file was generated by puppet using the template <%= template_filename %>". For this, I'd need puppet to provide some sort of $template_filename variable. I'd also like templates to be able to make decisions based on the existence of files with particular names in the module's "templates" or "files" directory. (Things like "if filename.$fqdn exists then paste its contents here".) For this, it would be sufficient for puppet to chdir to the template directory, and let the template use ruby code to discover everything else. I thought there was already a feature request to chdir to the template directory, but I can't find it. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
