Sync the calls in a puppet module

9 views
Skip to first unread message

Abhishek Kane

unread,
Jul 19, 2017, 6:27:39 AM7/19/17
to Puppet Users
Hi puppet experts,

In classA I am calling some custom type and then calling classB. classB is dependent on the work that is done in custom types.

But in the puppet apply command I see that classB gets called before the custom type, and it fails.

Is there a way to sync these calls?

Thanks,
Abhishek

jcbollinger

unread,
Jul 19, 2017, 10:06:57 AM7/19/17
to Puppet Users
You "call" functions.  You "declare" classes and resources.  Ultimately, these function calls and class and resource declarations collectively result in the production of a "catalog" describing the configuration properties that must be ensured and a set of relationships among them that influence the order in which those properties must be synchronized.  Puppet synchronizes the target machine state with the catalog in a manner and order it chooses, subject to the constraints of the ordering relationships in the catalog.

So yes, Puppet has ways to direct the relative order of application of classes and resources.  The Puppet language reference has a whole section discussing the details, and you should read it.  Be sure to select the manual version corresponding to the Puppet version you are using.  While you're at it, you may want to read the rest of the language reference, too.


John

Reply all
Reply to author
Forward
0 new messages