Remove useless function and clean up.
This commit is contained in:
parent
035ef8f46a
commit
89e3c0d78f
1 changed files with 5 additions and 10 deletions
|
@ -3,13 +3,6 @@ require "yaml"
|
||||||
require "puppet"
|
require "puppet"
|
||||||
require "optparse"
|
require "optparse"
|
||||||
|
|
||||||
def find_resource(catalog, type, query_file)
|
|
||||||
resource = catalog.resource(type, query_file)
|
|
||||||
unless resource.nil?
|
|
||||||
resource.file
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
:types => [],
|
:types => [],
|
||||||
}
|
}
|
||||||
|
@ -53,10 +46,12 @@ end
|
||||||
|
|
||||||
catalog = YAML::load_file(options[:yamlfile])
|
catalog = YAML::load_file(options[:yamlfile])
|
||||||
|
|
||||||
ARGV.each do |search|
|
ARGV.each do |search_title|
|
||||||
options[:types].each do |type|
|
options[:types].each do |type|
|
||||||
manifest = find_resource(catalog, type, search)
|
resource = catalog.resource(type, search_title)
|
||||||
puts "#{type}[#{search}] defined in #{manifest}"
|
unless resource.nil?
|
||||||
|
puts "#{resource} defined in #{resource.file}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue