Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-7610

sshkey uses name instead of title for duplication check

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: sshkeys_core
    • Labels:
      None
    • Environment:

      server

      centos-6.8 (updated on Mar 01, 2017)
      puppetserver-2.7.2-1.el6.noarch (2.7.2)

      agent

      centos-6.9 (current)
      puppet-agent-1.9.3-1.el6.x86_64 (4.9.4)

    • QA Risk Assessment:
      Needs Assessment

      Description

      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 is that changing the title suffices in it being a different resource.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                russ russ
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Zendesk Support