diff options
author | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-09 00:48:28 +0000 |
---|---|---|
committer | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-09 00:48:28 +0000 |
commit | ebcb6b6df7af42632a6c1beaa1b60171ff32b61e (patch) | |
tree | 2d82562a541862f20daf9e05f1a3642a27e4ffb1 /lib/puppet/parser/templatewrapper.rb | |
parent | ba6257c02ef5e4bd32d58d40087f84dda95141c3 (diff) | |
download | puppet-ebcb6b6df7af42632a6c1beaa1b60171ff32b61e.tar.gz puppet-ebcb6b6df7af42632a6c1beaa1b60171ff32b61e.tar.xz puppet-ebcb6b6df7af42632a6c1beaa1b60171ff32b61e.zip |
The template function now tries to first find a template within a module
(if the template path looks like it belongs to a module) and only when that
fails looks for it in templatedir
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2277 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/templatewrapper.rb')
-rw-r--r-- | lib/puppet/parser/templatewrapper.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/puppet/parser/templatewrapper.rb b/lib/puppet/parser/templatewrapper.rb index 62b45852b..3b8cc3a3a 100644 --- a/lib/puppet/parser/templatewrapper.rb +++ b/lib/puppet/parser/templatewrapper.rb @@ -7,11 +7,7 @@ class Puppet::Parser::TemplateWrapper def initialize(scope, file) @scope = scope - if file =~ /^#{File::SEPARATOR}/ - @file = file - else - @file = File.join(Puppet[:templatedir], file) - end + @file = Puppet::Module::find_template(file) unless FileTest.exists?(@file) raise Puppet::ParseError, |