Method: Chef::Provider::TemplateFinder#find

Defined in:
lib/chef/provider/template_finder.rb

#find(template_name, options = {}) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/chef/provider/template_finder.rb', line 30

def find(template_name, options = {})
  template_name = template_source_name(template_name, options)

  if options[:local]
    return template_name
  end

  cookbook_name = find_cookbook_name(options)
  cookbook = @run_context.cookbook_collection[cookbook_name]

  cookbook.preferred_filename_on_disk_location(@node, :templates, template_name)
end