Ask Your Question

which one will execute first a module or a local class defined

asked 2013-11-25 05:37:44 -0600

kampy gravatar image

Hi All,

I have a module called puppet-tempest. To add some dependencies to it i have created a manifest. Below are the contents of my site.pp :

import "dependencies.pp" include dependencies include tempest

Every time I run this file i am observing the module tempest is executing first.

Please let me know how to overcome this .

regards, kampy

edit retag flag offensive close merge delete



Could you provide some more information regarding what you are trying to achieve, please? Could you paste the content of 'dependencies.pp' somewhere, please?

rjc gravatar imagerjc ( 2013-11-25 07:48:03 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-11-25 09:29:45 -0600

llowder gravatar image

Import and include are both functions, as such they will be executed in a parse order dependent manner.

That being said, all they do is add things to the catalog. The order in which they are applied is non-determinstic for most versions of puppet (the latest (at time of writing) has a way to change that,but it is still experimental).

I would strongly recommend that you not use import in this case, but instead convert whatever is in dependencies.pp into a module. You can then do things like Class['dependencies'] -> Class['tempest'] or make use of other forms ... (more)

edit flag offensive delete link more


Here's the doc. on ordering resource execution.

Ancillas gravatar imageAncillas ( 2013-11-26 09:34:51 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-11-25 05:37:44 -0600

Seen: 42 times

Last updated: Nov 25 '13