Hello again, I had a little time today so I decided to continue my work. But now I fall into another trap. I guess the parsedfile provider is not really prepared to handle multiple keyattribues:
# FILE: lib/puppet/provider/parsedfile.rb
def self.prefetch(resources = nil)
# Reset the record list.
@records = prefetch_all_targets(resources)
match_providers_with_resources(resources)
end
Despite the fact that match_providers_with_resources doesnt take
multiple keyattributes into account I have a bigger problem here:
resources is a hash and name is the keyattribute. So when I define
something like this in my manifests
# Titlepattern will set name=>foo protocol=>tcp
port { 'foo:tcp':
description => 'Puppettest',
number => '23',
}
# Titlepattern will set name=>foo protocol=>udp
port { 'foo:udp':
description => 'Puppettest',
number => '90',
}
i can only see one resource in the match_providers_with_resources
method (resources['foo']). Can you give me hint where to fix that
or is this something deep down in puppet internals that still rely
on the fact that name is uniq?
-Stefan
pgpJnxGDULCes.pgp
Description: PGP signature
