I want to find out if a specific recipe will be run on a node from inside a different recipe. I can node.recipe?(recipe_name) method, however some of my recipies are managed by roles and recipe? does not seem to look into the roles run list.
Is there an easy way to find out if my recipie[redis] is going to be run on the current node?
You're looking for the recipes
method. Note the trailing s
! So:
node.recipes.include?(recipe_name)
Also note that there is a similar pair of methods for role inspection. Those are role
and roles
. For both roles and recipes, the singular form is for those directly assigned and the plural for the fully resolved set.
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