Correction: "seems to work as expected" :)  overriding name gets it to the
"repo" user, but does not keep in other places. Looks like I'm back to using
variables.  Thanks for the tip.

what you can do is create a define per ssh key and then for example use $name of this define to build a title for the ssh_.. type, as well define the user, something like:

define ssh::key::user1(){

  ssh_authorized_key{"user1 for ${name}":
    user => $name,
    key => 'AAAA..',
    ...
  }
}

and then you simply declare the define when you need key user1 for a certain user:

ssh::key::user1{'root': }
ssh::key::user1{'dummy': }

or even shorter:

ssh::key::user1{['root', 'dummy']: }

if you need to place a key for user1 for 2 users at one place.

user1 can for example be a member of the team. with the define you can also easily deploy multiple keys per co-worker by simply putting a second key statement into the define.

if you need to declare the same key at multiple places, you simply wrap the declaration of the define with a class and include this class wherever you would declare the define. for example:

class ssh::key::user1::root {
  ssh::key::user1{'root': }
}

somewhere else:

include ssh::key::user1::root


cheers pete

--
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.

Reply via email to