On Wed, Feb 11, 2015 at 4:18 PM, Joseph Karns <[email protected]> wrote:
> Hello Leam:
>
> I think your looking for something like this:
>
> -----------------------------
>
> define sysusers::setup(
>     $hash
> ) {
>
>
>     case $::osfamily {
>         'redhat': {
>             $user_home = '/home'
>         }
>         'solaris': {
>             $user_home = '/export/home'
>         }
>         'default': {
>             $user_home = '/home'
>         }
>     }
>
>     if(!defined(User[$name])) {
>     user { $name :
>         home         => "${user_home}/$hash[$name]['name'],
>       ensure    => $hash[$name]['ensure'],
>       comment    => $hash[$name]['comment'],
>       expiry    => $hash[$name]['expiry'],
>       gid            => $hash[$name]['gid'],
>     }
>   }
> }
>
> ---------------------------------------
>
> Let me know
>
> Thanks
> Joey
>

Fortunately I'm doing this on one box. It put the entire user hash
into each line in /etc/passwd.  Still cleaning up.  :)

Leam

-- 
Mind on a Mission

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACv9p5rM%2BdOKEF1%3D5065tUW2vkurNoNwvShU%3DGti%3DWkstYzYZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to