I want to have a condition to do something in a chef recipe only if there is no other recipe in the run list, and another that will be true only if a specific recipe is not in the run list. Is there a way to do this?
Also, what does the best practices say about this kind of logic? Should this be avoided from some reason?
In general this kind of thing can be very fragile as if you are using
include_recipe
, things might be sensitive to order. But that said, you can do it: