Discussion:
[Puppet Users] realizing virtual ssh_authorized_key
seph
2009-04-21 20:00:18 UTC
Permalink
I'm trying to use ssh_authorized_key to manage my user's ssh keys. I
basically have this (across a couple of files):

class user::virtual {
@user { "seph":
ensure => "present",
uid => "2001",
comment => "seph",
home => "/home/seph",
shell => "/bin/bash",
allowdupe => false,
managehome => true,
}

@ssh_authorized_key { "seph-2008":
ensure => present,
key => "...",
type => "ssh-dss",
name => "***@macbook-2008",
user => seph,
}
}


class user::unixadmins inherits user::virtual {
realize(
User["seph"],
ssh_authorized_key["seph-2008"],
)
}

node test {
include user::unixadmins
}


I correctly get the user seph, but not the ssh authorized key. If I
switch to a real ssh_authorized_key by removing the @, then it creates
/home/seph/.ssh/authorized_keys correctly. But I can't figure out how to
realize it when it's a virtual resource. I've tried a couple of ways.

Any suggestions for how to do this? Or if there's some better approach
here?

thanks
seph


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-***@googlegroups.com
To unsubscribe from this group, send email to puppet-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
seph
2009-04-21 21:00:44 UTC
Permalink
Ah ha. After a long time debugging this on irc (thanks guys!) I found
my typo. I had defined unixadmins twice, and one was wrong. Though if
people have suggestions for a better way to implement this sort of
thing, I'd love to hear them.

seph
Post by seph
I'm trying to use ssh_authorized_key to manage my user's ssh keys. I
  class user::virtual {
      ensure     => "present",
      uid        => "2001",
      comment    => "seph",
      home       => "/home/seph",
      shell      => "/bin/bash",
      allowdupe  => false,
      managehome => true,
    }
      ensure  => present,    
      key     => "...",
      type    => "ssh-dss",
      user    => seph,
    }
  }
  class user::unixadmins inherits user::virtual {
    realize(
      User["seph"],
      ssh_authorized_key["seph-2008"],
    )
  }
  node test {
    include user::unixadmins
  }
I correctly get the user seph, but not the ssh authorized key. If I
/home/seph/.ssh/authorized_keys correctly. But I can't figure out how to
realize it when it's a virtual resource. I've tried a couple of ways.
Any suggestions for how to do this? Or if there's some better approach
here?
thanks
seph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-***@googlegroups.com
To unsubscribe from this group, send email to puppet-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Continue reading on narkive:
Search results for '[Puppet Users] realizing virtual ssh_authorized_key' (Questions and Answers)
4
replies
Someone is using my ip address?
started 2011-05-27 14:58:47 UTC
computers & internet
Loading...