I have two recipes:
In the case of this EC2 instance when it first boots up, I need recipe #2 to be executed before recipe #1 or the volume won't be mounted yet. How can I ensure that this order of execution will be explicitly forced?
Chef always executes recipes in the order you specify them. It will not arbitrarily reorder things. So if you want one recipe to be run before another, just load them in that order (e.g. In the run_list)
To further enforce this (at the expense of additional coupling between your recipes) you can also use include_recipe at he beginning of the second recipe to load the first one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With