My guess is it's an issue in your self.instances method and a matter
of exactly where you're called new. I nearly always having something
like:
def self.prefetch(resources)
instances.each do |prov|
if resource = resources[
prov.name]
resource.provider = prov
end
end
end
Where instances returns an array of objects created using new.
def self.instances
some_list_of_things.collect do |obj|
new({
name:
obj.name,
ensure: :present,
})
end
end
Hopefully that helps, if not I'd recommend posting a gist of the
self.instances method or a pointer to the whole provider.
Thanks
Gareth
> Any ideas??
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
puppet-users...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/puppet-users/569D96C4.6070309%40gmail.com.
> For more options, visit
https://groups.google.com/d/optout.
--
Gareth Rushgrove
@garethr
devopsweekly.com
morethanseven.net
garethrushgrove.com