Issue #4920 has been updated by Peter Meier.
So your intention is to mix template sources and plain file sources. Right? Indeed that would be interesting. However, there is one architectural problem: templates are evaluated on the server at compile time while file sources are passed as is to the client and the client then requests each file-source until the server returns a file. This could probably be solved by treating `erb:///...` as special url, which will then trigger a template compile on the master. However, then we would still need to have all the variables in the current scope available and also the facts would be missing. So this would still not work. An option might be the recent discussed post-compile processor, which could also [optimize the file sources]:http://groups.google.com/group/puppet-dev/browse_thread/thread/1c8ac2c2d6fab46#2c8d8baa39d1d717 and would be a general framework to do such things. Still at this point we would need to have the possibility to jump back at the actual scope of this file resource to get all the variables right. Another option might be to do it right at compile time, which would probably increase the complexity of the compile process but would solve all the other problems. So I was just writing down some ideas that came up. I'm not sure if I got everything right?! ---------------------------------------- Feature #4920: Treat file sources as templates http://projects.puppetlabs.com/issues/4920 Author: martin krafft Status: Unreviewed Priority: Normal Assignee: Category: file Target version: Affected version: Keywords: Branch: Under certain circumstances, file sources should be evaluated by ERB. I imagine three possible syntax for that: 1. A parameter: <pre> file { "/tmp/file": source => ["puppet:///$fqdn", "puppet:///somedefault"], erbeval => true } </pre> 2. A prefix: <pre> file { "/tmp/file": source => ["puppet:///$fqdn", "erb:puppet:///somedefault"], } </pre> 3. Using the file extension: <pre> file { "/tmp/file": source => ["puppet:///$fqdn", "puppet:///somedefault.erb"], } </pre> In general, I would like to see the difference between files and templates vanish. However, since ERB is dreadfully slow, that might not be desired. Hence I would suggest a combination of (1.) and (2.) (stupid redmine syntax parsing idiocy): erbeval defaults to false, in which case only the sources prefixed with "erb:" are evaluated. If erbeval is true, all sources are evaluated (and the prefix ignored). If wanted, a "noerb:" could also be introduced. -- 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 post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
