Here we go:
Part 1: Custom Fact (modules/users/lib/facter/user_home.rb)
require 'etc'
Etc.passwd { |user|
Facter.add("home_#{user.name}") do
setcode do
user.dir
end
end
}
When you are creating a user, you
You can change the path to authorized_keys as it is done in my ssh puppet
module (http://forge.puppetlabs.com/thbe/ssh). The next version of this
module will give you the possibility to deploy usernames with keys as
parameters but I'm not sure when I'll find time to implement this. Till now
you hav
Thanks for that Ygor, I appreciate the help.
On Thursday, 30 January 2014 14:33:59 UTC+10, Ygor wrote:
>
> I have a solution for this that involves a custom fact, written in Ruby,
> for the user's homedir.
> I will gladly post the code for the fact and the manifest code showing how
> I use it.
I have a solution for this that involves a custom fact, written in Ruby, for
the user's homedir.
I will gladly post the code for the fact and the manifest code showing how I
use it. However, I am posting this from home and all my Puppet code is at my
work. I will post it tomorrow.
One small
So ...
I am tasked with managing ssh keys for which I want to use puppet to do the
deployment.
I dont know ahead of time which users will using/assigned keys so, my
question is.
how to determine the homedir of any user? is there a variable present with
this info without resorting to an exec?
N