Running inherited node manifest first

16 views
Skip to first unread message

Guy Knights

unread,
Jun 21, 2012, 1:38:14 PM6/21/12
to puppet...@googlegroups.com
Hi,

What is the best way to ensure that when a node inherits another node, that the inherited node's manifest runs first? Is there was a to ensure this happens?

Thanks,
Guy

jcbollinger

unread,
Jun 21, 2012, 4:43:38 PM6/21/12
to puppet...@googlegroups.com


On Thursday, June 21, 2012 12:38:14 PM UTC-5, Guy Knights wrote:

What is the best way to ensure that when a node inherits another node, that the inherited node's manifest runs first? Is there was a to ensure this happens?

In principle, the leaf node can declare relationships between all the classes it declares and all those declared by the inherited node.  In practice, you probably don't want that, because you'll end up with dependency cycles unless you're either very careful or very lucky.  It's also hard to maintain.

All that underscores the fact that you're thinking about the problem the wrong way.  Whether one resource needs to be applied before another is a function only of those resources, not of which node declaration caused them to be added to the catalog.  Set up appropriate relationships between your resources, and Puppet will find an agreeable order in which to apply them.


John

Reply all
Reply to author
Forward
0 new messages