Unexpected Puppet notify order
As written in this PuppetLabs wiki page about Puppet ordering:
Puppet might sync them in any order: unlike with a procedural language, the physical order of resources in a manifest doesn’t imply a logical order.
You should use before, require, notify, subscribe to define dependencies between resources in your manifests. Also, you can define your dependencies by chaining your resource references. E.g:
notify {
"I'm notifying you.":
}
->
notify {
"So am I!":
}
To guarantee order of execution in puppet you need to have some class hierarchy.
Definitions inside single class can be executed in any order, you cannot influence that.