On Thu, May 17, 2012 at 9:12 PM, Dan White <y...@comcast.net> wrote: > One way I have seen for setting up system users is to create them > virtually and then realize them with the spaceship operator, say by ggroup > -- like this: > > User <| groups == 'wheel' |> > > Reference: > http://www.mail-archive.com/puppet-users@googlegroups.com/msg29719.html > > In the referenced posting, the OP was trying to create a bunch of virtual > users with all the parameter data in hiera. > But this is usually done with create_resources and that don't do virtual :( > > So, I am asking a couple of questions going in different directions: > > Can anyone show me a way to create a virtual resource from hiera ? > Actually, that should be: Hot to create a bunch of virtual resources from > a hiera-hash > > Contrarywise, it was suggested in the referenced posting that one > "could find all users in all hierarchies with hiera_hash and then declare > them at once". > The down side of that is that using the spaceship operator, > one can filter by class parameters and there is no problem if the same > virtual resource is realized more than once. > I am not certain that the hash-merge would produce a list of unique > resource parameters. > If the same user was in more than one hiera file, would it appear multiple > times in the hash ? >
That's exactly what I was suggesting. If you declared the users as create_resources expected it, and included the same user in multiple levels of the hierarchy, the hash merging functionality would leave you with a single user declaration. One caveat (as of right now): you need to declare ALL the parameters in ALL the levels of the hierarchy. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > 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. > > -- Gary Larizza Professional Services Engineer Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.