With 2 resources named pxe-example.com and dhcp-example.com I get duplicate definition error. The target and title are different in both. The rest is the same.
sshkey { 'pxe-example.com':
ensure => 'present',
name => 'example.com',
type => 'ssh-rsa',
key => '<redacted>',
target => '/var/lib/<user>/.ssh/known_hosts',
}
In an environment where sshd is intentionally configured to not read a global known hosts file, attempting to change the resource title for the same key installed into different locations fails.
Cannot alias Sshkey[pxe-example.com] to ["example.com"] at /etc/puppetlabs/code/environments/dhcp/site/role/manifests/pxe.pp:56; resource ["Sshkey", "example.com"] already declared at /etc/puppetlabs/code/environments/dhcp/site/role/manifests/dhcp.pp:73 at /etc/puppetlabs/code/environments/dhcp/site/role/manifests/pxe.pp:56:3 on node dhcp-failover.err.internal
Expected Behavior
Expected behavior is that changing the title suffices in it being a different resource.
Steps to Reproduce
See above.
Environment
Version puppetserver-2.7.2-1.el6.noarch (2.7.2)/puppet-agent-1.9.3-1.el6.x86_64 (4.9.4)
Describe the Bug
With 2 resources named
pxe-example.com
anddhcp-example.com
I get duplicate definition error. The target and title are different in both. The rest is the same.In an environment where sshd is intentionally configured to not read a global known hosts file, attempting to change the resource title for the same key installed into different locations fails.
Expected Behavior
Expected behavior is that changing the title suffices in it being a different resource.
Steps to Reproduce
See above.
Environment
Additional Context
This was originally filed as MODULES-7610.