Re: [Puppet Users] Dependency Ordering

32 views
Skip to first unread message

Mark

unread,
Nov 24, 2012, 3:48:42 PM11/24/12
to puppet...@googlegroups.com
Also say I have a node "webapp" that has a rails application that runs on nginx. Should I add nginx to the node "webapp" or as a required dependency in since my rails application module?

node webapp {
include nginx
include railsapplication
}

OR

node webapp {
include railsapplication
}

class rails application {
require nginx
….
}
On Nov 24, 2012, at 11:17 AM, Smashed <static....@gmail.com> wrote:

class Foo {

require A

… some other stuff

}


class A {

include B

include C

include D

}


When structured like this does this mean that A,B,C and D will all be processed before Foo?


--
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/-/xKL6ns_Lef4J.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Ryan Coleman

unread,
Nov 25, 2012, 9:22:48 PM11/25/12
to puppet...@googlegroups.com
On Sat, Nov 24, 2012 at 11:17 AM, Smashed <static....@gmail.com> wrote:

class Foo {

require A

… some other stuff

}


class A {

include B

include C

include D

}


When structured like this does this mean that A,B,C and D will all be processed before Foo?

Short answer, yes.

The notify resource can be really useful for experimenting with stuff like this. I created a gist that you can clone and play with. https://gist.github.com/4146253

 

--
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/-/xKL6ns_Lef4J.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.



--
Ryan Coleman | Modules & Forge | @ryanycoleman | ryancoleman in #puppet
 


jcbollinger

unread,
Nov 26, 2012, 10:37:31 AM11/26/12
to puppet...@googlegroups.com


On Saturday, November 24, 2012 1:17:54 PM UTC-6, Smashed wrote:

class Foo {

require A

… some other stuff

}


class A {

include B

include C

include D

}


When structured like this does this mean that A,B,C and D will all be processed before Foo?



Classes A, B, C, and D will all be parsed before anything following the 'require' line in class Foo.  Resources declared directly by class A will be applied before resources declared directly by class Foo.  The given code does not declare any other ordering constraints.

It looks like you are running into issues related to the containment problem.  Search for documentation and discussion of the "anchor pattern" on this group and on the PL site for more information.


John

Reply all
Reply to author
Forward
0 new messages