That behavior is not expected.
Can you run chef-client with -VV and share the chef-client log output as
well as your log? It would be ideal if your log had time stamps. Also,
what version of chef-client are you running?
Certainly you could use notifications to force an ordering (e.g. set all
but first to action :nothing and then have each script resource subscript
to its intended predecessor), but you shouldn’t have to do that – order
of definition in the cookbook is a defined total order of execution.
From: email@example.com [mailto:firstname.lastname@example.org]
Sent: Monday, February 10, 2014 8:42 AM
Subject: [chef] Order of Execution of resources in a cookbook
I have a cookbook (to be run on a windows node) that has multiple
"script" and “powershell_script” resources defined in the order I want
them to be executed.
I am logging to a text file within each resource. The log shows that the
resources are not being executed in the order they are written in the
Is it an expected behavior? If so, is there a way to force them to run in
a particular order?