Hi Jason! Came into exactly this issue. I know 3 years have passed, but have you solved the issue the way you intended to?
On Friday, August 8, 2014 at 9:03:21 AM UTC+3, Jason Ball wrote: > > Hi all, > > I have a user collection via a custom virtual resource, this allows me to > realize users based on their group memberships: > > Accounts <| unixgroups=="foo" |> > > this works nicely as centralised authentication is not an option for this > particular deployment. > > I now need to develop a template that controls access via an xml config > file, the contents would depend on enumerating users in a given group > similar to the 'realize' option, conceptually something like the following: > > <% @users.each do |user| -%> > <authorize username="<%= @user.name -%>" password="<%= > @user.password -%>"> > [... add conditional permissions ...] > </authorize> > <% end -%> > > While I'm aware I could explicitly list the users, being able to generate > a value based off the 'realize' would be beneficial as it would allow for a > single source of truth in my manifests. > > Ideally I'm looking for: > > $users = Accounts <| unixgroups="foo" |> > > or similar to pass to the template. > > > -- 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/1792e557-0da3-4082-b7c2-8337aa49056a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
