I'm doing some funky things to have some shared user accounts realize SSH 
keys of authorised users.

To cut a long story short, everything basically works, except there's a 
case where I need to discover the home directory path of a user that has 
been previously created.

I had originally had an inline template:
  $home = inline_template("<%= Etc::getpwnam('${user}')['dir'] %>")
but I then realised that this won't work because it's obviously evaluated 
on the server.

My question is, can I lookup a value from an existing object in a similar 
way to this:

$andy_home = $::role ? {
  special_case => '/andy',
  default      => '/home/andy',
}

user { 'andy':
  home => $andy_home,
}

$user_home = User['andy']['home']
notice("Andy's home directory is: $user_home")

cheers,

Andy

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/RrqjFHZK8usJ.
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.

Reply via email to