I've got a situation where I have multiple types that I need to autorequire
but I only want to search through the catalog once to require them.
I've tried:
@autodeps = {
:typea => [],
:typeb => [],
:typec => []
}
@autodeps.each_key do |dep|
autorequire(dep) do
if @autodeps[type].nil? then
@autodeps[type] = []
catalog.resources.find_all do |r|
@autodeps.keys.each do |dep|
r.is_a?(Puppet::Type.type(dep)) and @autodeps[dep] << r[:name]
end
end
end
@autodeps[type]
end
end
I understand that I'm passing a block down to autorequire and that I'm
completely losing scope on @autodeps but is there some reasonable way to do
this so that I only have to dig through the catalog one time to find my
dependencies?
Thanks,
Trevor
--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
[email protected]
-- This account not approved for unencrypted proprietary information --
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.