On Oct 11, 2012, at 7:09 AM, llowder <llowde...@gmail.com> wrote:


On Thursday, October 11, 2012 8:37:39 AM UTC-5, alcy wrote:
>
> Hello,
>
> I have a class like:
>
> class wrapper {
>   include foo
>   include bar
>   include baz
> }
>
> And a node like:
>
> node x {
>   include someclass
>   include wrapper
>   Class["someclass"]->Class["wrapper"]
> }
>
> The class chaining in node x doesn't get respected. In irc I was
> suggested there being a possibility of this being related to #8040.
> Can anyone suggest if that indeed might be the case ? Is there a clear
> process to tell if certain chaining of classes or resources would
> mandate using anchors or not ? Just to be clear, there is no order
> required in the classes inside the wrapper class. But just that to
> ensure before any of these, the class "someclass" gets applied. Any
> ideas, and possible approaches would be nice.
>


>From what I can tell, this looks like the main use case for the "anchor
pattern" in stdlib.


Yes, this is a perfect example of when to employ the anchor pattern. It's
also a perfect example of the bug we need to fix in puppet.

Class foo, bar, an baz will "float off" in the relationship graph because
class wrapper contains no other resources to "anchor" them down.

If you add a begin an end anchor resources to class wrapper and establish
relationships between them and the three contained classes, it should work
as you expect

I will give a concrete example, if you wish, once I get to my desk.

-Jeff


https://github.com/puppetlabs/puppetlabs-stdlib


-- 
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/vd9gYqJEADgJ.
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.

-- 
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.

Reply via email to