----- Original Message ----- > From: "Mohit Chawla" <mohit.chawla.bin...@gmail.com> > To: puppet-users@googlegroups.com > Sent: Thursday, October 11, 2012 10:04:41 PM > Subject: Re: [Puppet Users] Re: Wrapper classes, ordering & anchors > > Hello John, > > On Thu, Oct 11, 2012 at 11:53 PM, jcbollinger > <john.bollin...@stjude.org> wrote: > > Yes. When one class declares another, whether via the 'include' or > > 'require' function or via a parametrized-style declaration, that > > (intentionally) does not establish any ordering relationship > > between the > > declaring and declared classes. Without something else, such as > > anchors, to > > establish an order between them, the two classes are disconnected > > in the > > relationship graph; that has come to be described as the declared > > class > > "floating off", especially when the declaring class is connected to > > multiple > > others in the relationship graph. > > > > Such disconnectedness is not necessarily a problem, because it may > > indeed be > > that no relative ordering of the classes involved is necessary or > > expected. > > If, however, the purpose of the one class declaring the other is to > > aggregate the latter into a larger unit, then it is a indeed an > > issue that > > needs to be addressed. That's where you need to use the anchor > > pattern. > > > > Thanks for the explanation, much appreciated. I suppose containing > resources is a fundamentally solved problem by virtue of the design > and goal, but containing classes seems to be a little different. > Nevertheless, I always do try to not having to enforce any order, but > at times, I suppose it becomes necessary. Thanks again for taking the > time to explain the behaviour.
i find the anchor pattern both a royal pain and too strict, i dont generally care to bind classes between two resources but instead just before some resource or class class wrapper { include one, two, three Class["one"] -> Class["two"] -> Class["three"] -> Class["wrapper"] } at this point 'include wrapper' will have those 3 classes and their resources completed before anything that requires the wrapper class this is often sufficient enough and satisfies 'just enough ordering hints' to me. -- 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.