diff options
author | Luke Kanies <luke@madstop.com> | 2008-06-16 23:59:18 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-06-16 23:59:18 -0500 |
commit | 2380fcd4d187e8592398015e96605ce4b5d63e7d (patch) | |
tree | 5adbe20d09731e9c3b6b7f16e5967ad7c9dcdc68 /lib | |
parent | 543181272da492755e9219530d17f76a63faffef (diff) | |
download | puppet-2380fcd4d187e8592398015e96605ce4b5d63e7d.tar.gz puppet-2380fcd4d187e8592398015e96605ce4b5d63e7d.tar.xz puppet-2380fcd4d187e8592398015e96605ce4b5d63e7d.zip |
Fixed #1012 - templates in the templatedir are preferred to module templates.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/module.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/module.rb b/lib/puppet/module.rb index b86931664..544d94ea9 100644 --- a/lib/puppet/module.rb +++ b/lib/puppet/module.rb @@ -63,6 +63,10 @@ class Puppet::Module return template end + # If we can find the template in :templatedir, we return that. + td_file = File.join(Puppet.settings.value(:templatedir, environment), template) + return td_file if File.exists?(td_file) + path, file = split_path(template) # Because templates don't have an assumed template name, like manifests do, @@ -76,7 +80,7 @@ class Puppet::Module if mod return mod.template(file) else - return File.join(Puppet.settings.value(:templatedir, environment), template) + return td_file # Return this anyway, since we're going to fail. end end |