> Thanks for the reply, I had a look into that, the problem is that I 
> originally create this user via a define somewhere else. If I would do 
> that I would have to configure my app at 2 different places which I 
> want to avoid. I've ended up doing it like this: 
>
>     User<| title == $app-admin[0] |> { 
>         groups +> "$title", 
>     } 
>

I think I've got it!  You need a helper define:

define application::realize_users ($groups) {
     User <| title == $name |> {
          groups +> $groups,
     }
}

Then, to realize your array of users:

define application::config ( $app-admin ) { 
     <snip>

     application::realize_users { $app-admin: groups => $title }
}


I think that will work for you.  I was able to implement it for our 
particular problem and it worked, but we also are trying to change shells 
and home directories, so it's a little more complicated than you need.

Good luck,
Jeremy

-- 
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/-/3IHIgG-rmyMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to