Issue #1818 has been updated by R.I. Pienaar aka Volcane.

Luke Kanies wrote:
> I just hate the fact that your filesystem -- which files exist and which 
> don't -- becomes a configuration setting determining which file you get.  It 
> seems like a much messier way to configure systems than the alternatives.

It is though a pattern thats used often and supported by file.

config files can be very different, for example I have many different types of 
tomcat machines and their xml based configs vary massively, trying to build 1 
template that builds all these diffeent types of files is very hard, unreadable 
and unmaintainable.  Multiple files would be simpler
----------------------------------------
Feature #1818: Allow multiple sources for a template and only use the first 
template if it exists
http://projects.reductivelabs.com/issues/1818

Author: Henrik Pedersen
Status: Rejected
Priority: Normal
Assigned to: 
Category: 
Target version: 
Affected version: 0.24.6
Keywords: 
Branch: 


Hi

It would be useful to be able to specify multiple sources for a template, and 
only use the first template if it exists.

Just like the syntax for 'source' where you can specify more sources for a file 
with the syntax :
<pre>
file { "/my/file":
   source => ["puppet://server/$hostname/file", ""puppet://server/defaultfile"]
}
</pre>


Using a template it should be possible to use the same syntax

<pre>
file { "/my/file":
   source => 'content => [template("hosts/$hostname/hosts.erb"), 
template("hosts/hosts.erb")]
}
</pre>

Currently puppet fails with an error of : err: Could not retrieve catalog: 
Could not find template /etc/puppet/templates/hosts/<hostname>/hosts.erb at 
/etc/puppet/manifests/classes/hosts.pp:9 on node <full hostname> since it only 
tries to load the first template and fails when that is missing.

Best regards
Henrik Pedersen
Denmark



-- 
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://reductivelabs.com/redmine/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
-~----------~----~----~----~------~----~------~--~---

Reply via email to