... at least in recipes. The point is: if possible you should describe the desired result and let chef figure out the way to get there. With an execute or ruby_block you only describe the way, but don't say a word about the result. That's why execute and friends are usually not portable. Furthermore, execute resources are always marked as updated.
So, please, use them only in providers. If you must use them in recipes, then give them an
not_if which checks whether they are actually necessary.