On Mon, Jul 19, 2010 at 7:52 AM, Klaus Ethgen <klaus+pup...@ethgen.de> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Hi, > > Am Sa den 12. Jun 2010 um 10:03 schrieb David Schmitt: >> You'll need to set a properly unique title, and set the namevar explicitely: >> >> @@sshkey { >> "${fqdn}dsa": >> name => $fqdn, >> ... >> "${fqdn}rsa": >> name => $fqdn, >> ... >> } > > That idea was pretty good. But then I get the message: > err: Could not retrieve catalog: Puppet::Parser::AST::Resource failed with > error ArgumentError: Cannot alias Sshkey[xxx.yyy.chrsa] to xxx.yyy.ch; > resource Sshkey[xxx.yyy.ch] already exists at > /etc/puppet/modules/ssh/manifests/init.pp:44 on node xxx.yyy.ch
The name attribute is the namevar and as such must also be unique in the catalog. Try this: @@sshkey { "${fqdn}-dsa": host_aliases => "${fqdn}", key => "${sshdsakey}"; "${fqdn}-rsa": host_aliases => "${fqdn}", key => "${sshrsakey}"; } Sshkey <<||>> This will prevent duplicate resource definitions. Hope this helps, -- Jeff McCune http://www.puppetlabs.com/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.