user3017717
user3017717

Reputation: 11

Puppet - How do I define the sequence of when the code on modules are run?

I have several modules that need to run in a specific sequence, how do I specify this ? Also how do I specify the sequence of classes and commands inside one module ?

Found an answer to this myself

using

require => File['something']

and

require class

Upvotes: 0

Views: 590

Answers (1)

SSHade
SSHade

Reputation: 36

Also you can set the sequence using -> For example:

node 'example.com' {
  class { 'foo' :
  } ->
  class { 'bar' :
  }
}

class bar will be applied after class foo.

Notify and subscribe also affect to applying sequence. See http://docs.puppetlabs.com/learning/ordering.html

Upvotes: 1

Related Questions