[Puppet Users] Re: add ssh key to several user accounts

2011-04-07 Thread ccm
Hey.

have a look at my last posting:

http://groups.google.com/group/puppet-users/browse_thread/thread/d74262daca8c0e8f

I wrote a small wrapper that might help you here.

Best,

ccm.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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.



Re: [Puppet Users] Re: add ssh key to several user accounts

2011-04-07 Thread Arnau Bria
On Thu, 7 Apr 2011 02:07:52 -0700 (PDT)
ccm ccm wrote:

 Hey.

Hi ccm.
 
 have a look at my last posting:
 
 http://groups.google.com/group/puppet-users/browse_thread/thread/d74262daca8c0e8f
 
 I wrote a small wrapper that might help you here.

Nice, but how to add same key to several accounts?
cause in your last example:

$team = [ 'ad...@domain.tld', 'us...@domain.tld' ]
sshauthkeys{ user2: keys = $team }
sshauthkeys{ user3: keys = $team }

I have to define user2/3/ so I'll have to define my 1500 accounts,
am I right? or am I missunderstanding your code?

 
 Best,
 
 ccm.
Thanks!
Arnau

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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.



[Puppet Users] Re: add ssh key to several user accounts

2011-04-07 Thread Arnau Bria
Hi again,

I've been thinking a little more and got more ideas, but I
don't know if they're possible, so I'll appreciate some expert opinion
on them:

1.-) modify authorized_key provider (create my own) where user
param accepts an array of elements (users)

user = [ 'user1' , 'user2' , ...]

I'm not sure if this is correct (or even possible, I don't know all
puppet types, but I don't remember any param that accepts and array
and forces the execution of the provider several times ). 


2.-) New type/provider where name is user in place of ssh_key.
Something like:

my_own_ssh_authorized_key { ' [ 'user1', 'user2', 'user3'  ] :
source  = me@mycomputer
key = jkladbglbsdlgb
type= 
}

this makes more sense as the provider will be called for each user, and
the code seems easy to implement (I'm ruby begginer) cause is an
adaptaion of current type/provider 


Any advice?

TIA,
Arnau

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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.