Ask Your Question
0

puppet executions sequence inside modules or classess

asked 2013-11-20 10:35:45 -0500

rakkaus gravatar image

Hi guys! I need to know about execution sequence inside module does it step by step from top?

I need to be sure that my first declared statement will be lauched 100% first with out any dependency or require or etc

Thank you!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-11-20 14:14:24 -0500

Ancillas gravatar image

updated 2013-11-20 14:17:27 -0500

Here's the documentation on resource ordering. Lavaman is correct that there is no implied order.

You can apply resource ordering to any resource, including classes. So, if you have a java module with two manifests: install.pp and config.pp. Then you could do something like this.

install.pp

class java::install {
  # install java...
}

config.pp

class java::config {
  # config java...
}

init.pp

# include the java::install class, and then include the java::config class, running them in order ( -> specifies the order)

class {'java::install': } ->
class {'java::config': }

Here's another Q&A that is loosely related.

edit flag offensive delete link more
1

answered 2013-11-20 13:43:18 -0500

lavaman gravatar image

updated 2013-11-20 14:09:41 -0500

Ancillas gravatar image

There is no implied ordering in puppet manifests. If you absolutely need some resource(s) to run before anything else in the catalog, you can do so using run stages:

http://docs.puppetlabs.com/puppet/latest/reference/lang_run_stages.html

You should only use them very sparingly, if at all. You can quickly run into circular dependency issues using run stages.

edit flag offensive delete link more

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

Stats

Asked: 2013-11-20 10:35:45 -0500

Seen: 5,966 times

Last updated: Nov 20 '13