Forrie
2011-Mar-28 21:31 UTC
[Puppet Users] Virtual user, depends on "group" being created first?
I want to realize some virtual users on several systems, but I want that to depend upon a certain group being present (and created if needed) first. How can I do this? The following works, because the group is being realized first. Group <| title == mygroup |> User <| title == mygroup |> -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nigel Kersten
2011-Mar-29 00:55 UTC
Re: [Puppet Users] Virtual user, depends on "group" being created first?
On Mon, Mar 28, 2011 at 2:31 PM, Forrie <forrie@gmail.com> wrote:> I want to realize some virtual users on several systems, but I want > that to depend upon a certain group being present (and created if > needed) first. How can I do this? > > The following works, because the group is being realized first. > > Group <| title == mygroup |> > User <| title == mygroup |> > >Do you want to require the group every time you realize the relevant user? If so, you can just put a require => in the User resource, and it will do the right thing. If you don''t, then you can do the relationship definition outside the resource definition like: Group["mygroup"] -> User["mygroup"] or even collapse the realization and relationship definition together if they''re both virtual. Group <| title == mygroup |> -> User <| title == mygroup |> -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.