m
I would really like to know what other people may suggest, the only thing that comes to my mind is to make use of tags for your users.
Regards
--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACPiFCLtFeMR0RpZ6Aha%3DnZe9Fuu_stAzigOhsvnGHVDewz-xg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
I would really like to know what other people may suggest, the only thing that comes to my mind is to make use of tags for your users.
Realize some of them
User <| groups == 'wheel' and tag== 'web'|> {
groups = ['wheel', 'apache']
}
As said i don't really like this option.
--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e5d904f8-ce23-4ec3-8488-017e9c6c2317%40googlegroups.com.
Mmmm another option could be set a custom fact that returns all the groups that exista and a user may have, and make use of it defining the virtual resource.
Realize some of them
Puppet DSL provides no mechanism, however, for selecting resources via a search expression without realizing all virtual resources among those selected.
Perhaps, however, you could do something clever at the point where you declare the users in the first place. If class our_users has some kind of visibility of whether the target node is (supposed to be) a web server, then it could initially declare users with the correct groups, so that you don't have to perform any fixup later. "Some kind of visibility" could be achieved via hiera or with the help of the roles & profiles pattern; there are probably other alternatives as well.