diff options
author | Dorin Pleava <dorin.pleava@puppet.com> | 2020-10-05 12:02:33 +0300 |
---|---|---|
committer | Dorin Pleava <dorin.pleava@puppet.com> | 2020-10-05 15:52:36 +0300 |
commit | 818e45b24d6fcdc49afe9e188ac761bf60373a31 (patch) | |
tree | 4498d2d3ac06d0812fdb7b99ea027bb510120d1a /spec/unit/provider | |
parent | 868382132a7e9408dbfd93d79d6436018b9da30d (diff) | |
download | puppet-sshkeys_core-818e45b24d6fcdc49afe9e188ac761bf60373a31.tar.gz puppet-sshkeys_core-818e45b24d6fcdc49afe9e188ac761bf60373a31.tar.bz2 |
(MODULES-10827) Exported sshkey already exists error
Using module https://github.com/ghoneycutt/puppet-module-ssh to export
and collect sshkey resources from nodes, an 'already declared' error
appears.
This happened because when the catalog is first converted to resouces,
the sshkey resource is added via
https://github.com/puppetlabs/puppet/blob/main/lib/puppet/resource/catalog.rb#L137,
where 'resource.ref'(https://github.com/puppetlabs/puppet/blob/main/lib/puppet/type.rb#L2548)
uses 'self.title'.
Since self.title goes to the title method defined in type.rb, it will
return a different title than the title method from
https://github.com/puppetlabs/puppetlabs-sshkeys_core/blob/main/lib/puppet/provider/sshkey/parsed.rb#L31.
This mismatch try to add both resource, resulting in the 'already
declared' error.
Diffstat (limited to 'spec/unit/provider')
0 files changed, 0 insertions, 0 deletions